﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
using netDxf;
using netDxf.Blocks;
using netDxf.Collections;
using netDxf.Entities;
using netDxf.Header;
using netDxf.Objects;
using netDxf.Tables;
using netDxf.Units;
using Attribute = netDxf.Entities.Attribute;
using Image = netDxf.Entities.Image;
using Point = netDxf.Entities.Point;
using Trace = netDxf.Entities.Trace;
using System.Threading;

namespace TestDxfDocument
{
    class ISO1339902
    {
        public static void FigureE1(Dictionary<string, Object> data)//ISO 13399-2图片E.1
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double ic = 12.7;
            double s = 3.175;
            double m = 0.9;
            double bs = 1.4;
            double epsr = 90 * pi / 180;
            double kch = 37.5 * pi / 180;
            double krins = 75 * pi / 180;
            double as1 = 11 * pi / 180;
            double re = 0.8;
            double l = ic / Math.Sin(epsr);
            double bsr = 2.7;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(ic / 2 * Math.Sin(krins) - Math.Sqrt(l * Math.Cos(epsr / 2) * l * Math.Cos(epsr / 2) - ic * ic / 4) * Math.Cos(krins), -ic / 2 * Math.Cos(krins) - Math.Sqrt(l * Math.Cos(epsr / 2) * l * Math.Cos(epsr / 2) - ic * ic / 4) * Math.Sin(krins));
            Vector2 v3 = new Vector2((-ic / 2 - v2.Y - m) / Math.Tan(pi - krins - epsr), -ic / 2 - m);
            Vector2 v4 = new Vector2(v3.X + bs, v3.Y);
            Vector2 v5 = new Vector2((v4.X * Math.Tan(krins - kch) - v4.Y - v2.X * Math.Tan(krins) + v2.Y) / (Math.Tan(krins - kch) - Math.Tan(krins)), (v4.X * Math.Tan(krins - kch) - v4.Y - v2.X * Math.Tan(krins) + v2.Y) / (Math.Tan(krins - kch) - Math.Tan(krins)) * Math.Tan(krins) - v2.X * Math.Tan(krins) + v2.Y);
            Vector2 v12 = new Vector2(v2.X + l * Math.Cos(krins), v2.Y + l * Math.Sin(krins));
            Vector2 v13 = new Vector2(v12.X - l * Math.Sin(krins), v12.Y + l * Math.Cos(krins));
            Vector2 v14 = new Vector2(v13.X - l * Math.Cos(krins), v13.Y - l * Math.Sin(krins));
            Vector2 v6 = new Vector2(v12.X - re * Math.Cos(krins), v12.Y - re * Math.Sin(krins));
            Vector2 v7 = new Vector2(v12.X - re * Math.Sin(krins), v12.Y + re * Math.Cos(krins));
            Vector2 v8 = new Vector2(v13.X + re * Math.Sin(krins), v13.Y - re * Math.Cos(krins));
            Vector2 v9 = new Vector2(v13.X - re * Math.Cos(krins), v13.Y - re * Math.Sin(krins));
            Vector2 v10 = new Vector2(v14.X + re * Math.Cos(krins), v14.Y + re * Math.Sin(krins));
            Vector2 v11 = new Vector2(v14.X + re * Math.Sin(krins), v14.Y - re * Math.Cos(krins));
            //侧视图
            Vector2 v15 = new Vector2(v12.X + 30, v1.Y);
            Vector2 v16 = new Vector2(v15.X + s, v15.Y);
            Vector2 v17 = new Vector2(v16.X, v3.Y);
            Vector2 v18 = new Vector2(v15.X, v17.Y + s * Math.Tan(as1));
            Vector2 v19 = new Vector2(v15.X - 2, v15.Y);
            Vector2 v20 = new Vector2(v16.X + 2, v15.Y);
            //线段
            //主视图
            Vector2[] Line1 = { v3, v4 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v4, v5 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v7, v8 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Vector2[] Line5 = { v9, v10 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v11, v3 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            //Arc Arc1 = new Arc(v22, (v18.Y - v19.Y) / 2.00 / Math.Cos(60 * pi / 180), -30, 30);
            //Arc Arc2 = new Arc(v27, (v18.Y - v19.Y) / 2.00 / Math.Cos(60 * pi / 180), -30, 30);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            Arc1.Vertexes.Add(new LwPolylineVertex(v7));
            Arc1.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v8));
            Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            Arc2.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v10));
            Arc4.Vertexes.Add(new LwPolylineVertex(v11));
            Arc4.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Circle circle1 = new Circle(v1, ic / 2);
            Vector2[] Line7 = { new Vector2(0, ic / 2 + 2), new Vector2(0, -ic / 2 - 2) };
            fun.drawPlinetype(dxf, Line7, 0.15, centre, Linetype.Center);
            Vector2[] Line8 = { new Vector2(ic / 2 + 2, 0), new Vector2(-ic / 2 - 2, 0) };
            fun.drawPlinetype(dxf, Line8, 0.15, centre, Linetype.Center);
            Line line9 = new Line(v5, new Vector2(v5.X + 5 * Math.Cos(krins - kch), v5.Y + 5 * Math.Cos(krins - kch)));
            Line line10 = new Line(v4, new Vector2(v12.X, v4.Y));
            Arc arc16 = new Arc(new Vector2(v3.X + bsr * Math.Cos(krins), v3.Y + bsr * Math.Sin(krins)), bsr, -45, -135);
            //侧视图
            Vector2[] Line11 = { v15, v18 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v18, v17 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v17, v16 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v19, v20 };
            fun.drawPlinetype(dxf, Line14, 0.15, centre, Linetype.Center);
            Line line15 = new Line(v17, new Vector2(v18.X, v17.Y));
            //主视图图层
            line9.Layer = dimensioning;
            line10.Layer = dimensioning;
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            //侧视图图层
            line15.Layer = dimensioning;
            //主视图
            dxf.AddEntity(line9);
            dxf.AddEntity(line10);
            dxf.AddEntity(circle1);
            //侧视图
            dxf.AddEntity(line15);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            /*//尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(line9, new Line(v5, v6), offset/2, dimensionStyle);
            angdim1.UserText = "KCH = " + Math.Round(kch / (pi / 180), 2) + "°";
            dxf.AddEntity(angdim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(-ic/2,0), new Vector2(ic/2,0)), v13.Y + offset, 0, dimensionStyle);
            dim2.UserText = "IC = " + Math.Round(ic, 2);
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(0,-ic/2), v3), -offset-v3.X/2, 270, dimensionStyle);
            dim3.UserText = "M = " + Math.Round(m, 2);
            dxf.AddEntity(dim3);
            //尺寸4
            LinearDimension dim4 = new LinearDimension(new Line(v3, v4), -offset, 0, dimensionStyle);
            dim4.UserText = "BS = " + Math.Round(bs, 2);
            dxf.AddEntity(dim4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(v4, v5), -offset,(krins-kch)/pi*180, dimensionStyle);
            dim5.UserText = "BCH = " + Math.Round(Math.Sqrt((v5.X-v4.X)* (v5.X - v4.X)+ (v5.Y - v4.Y)* (v5.Y - v4.Y)), 2);
            dxf.AddEntity(dim5);
            //尺寸6
            LinearDimension dim6 = new LinearDimension(new Line(v15, v16), offset, 0, dimensionStyle);
            dim6.UserText = "S = " + Math.Round(s, 2);
            dxf.AddEntity(dim6);
            //尺寸7
            Angular2LineDimension angdim7 = new Angular2LineDimension(line10, new Line(v5, v6), offset, dimensionStyle);
            angdim7.UserText = "KRINS = " + Math.Round(krins / (pi / 180), 2) + "°";
            dxf.AddEntity(angdim7);
            //尺寸8
            RadialDimension dimrad8 = new RadialDimension(arc16, -100, offset, dimensionStyle);//DimensionStyle.Default);
            dimrad8.UserText = "BSR = " + Math.Round(bsr, 2);
            dxf.AddEntity(dimrad8);
            //尺寸9
            Angular2LineDimension angdim9 = new Angular2LineDimension(line15, new Line(v17, v18), offset, dimensionStyle);
            angdim9.UserText = "AS = " + Math.Round(kch / (pi / 180), 2) + "°";
            dxf.AddEntity(angdim9);*/
            //尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(line9, new Line(v5, v6), offset / 2, dimensionStyle);
            angdim1.UserText = "KCH";
            dxf.AddEntity(angdim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(-ic / 2, 0), new Vector2(ic / 2, 0)), v13.Y + offset, 0, dimensionStyle);
            dim2.UserText = "IC";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(0, -ic / 2), v3), -offset - v3.X / 2, 270, dimensionStyle);
            dim3.UserText = "M";
            dxf.AddEntity(dim3);
            //尺寸4
            LinearDimension dim4 = new LinearDimension(new Line(v3, v4), -offset, 0, dimensionStyle);
            dim4.UserText = "BS";
            dxf.AddEntity(dim4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(v4, v5), -offset, (krins - kch) / pi * 180, dimensionStyle);
            dim5.UserText = "BCH";
            dxf.AddEntity(dim5);
            //尺寸6
            LinearDimension dim6 = new LinearDimension(new Line(v15, v16), offset + v13.Y, 0, dimensionStyle);
            dim6.UserText = "S";
            dxf.AddEntity(dim6);
            //尺寸7
            Angular2LineDimension angdim7 = new Angular2LineDimension(line10, new Line(v5, v6), offset, dimensionStyle);
            angdim7.UserText = "KRINS";
            dxf.AddEntity(angdim7);
            //尺寸8
            RadialDimension dimrad8 = new RadialDimension(arc16, -100, offset, dimensionStyle);//DimensionStyle.Default);
            dimrad8.UserText = "BSR";
            dxf.AddEntity(dimrad8);
            //尺寸9
            Angular2LineDimension angdim9 = new Angular2LineDimension(line15, new Line(v17, v18), offset, dimensionStyle);
            angdim9.UserText = "AS";
            dxf.AddEntity(angdim9);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE2(Dictionary<string, Object> data)//ISO 13399-2图片E.2
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double ic = 12.7;
            double s1 = 3.175;
            double s = 3;
            double epsr = 90 * pi / 180;
            double as1 = 7 * pi / 180;
            double re = 0.8;
            double gan = 11 * pi / 180;
            double lbb = 3;
            double l = ic / Math.Sin(epsr);
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v10 = new Vector2(l * Math.Cos(epsr) + ic / 2 * Math.Tan(epsr / 2), l * Math.Sin(epsr) - ic / 2);
            Vector2 v11 = new Vector2(v10.X - l, v10.Y);
            Vector2 v12 = new Vector2(v11.X - l * Math.Cos(epsr), v11.Y - ic);
            Vector2 v13 = new Vector2(v10.X - l * Math.Cos(epsr), v12.Y);
            Vector2 v2 = new Vector2(v10.X - re * Math.Cos(epsr) / Math.Tan(epsr / 2), v10.Y - re * Math.Sin(epsr) / Math.Tan(epsr / 2));
            Vector2 v3 = new Vector2(v10.X - re / Math.Tan(epsr / 2), v10.Y);
            Vector2 v5 = new Vector2(v11.X - re * Math.Cos(epsr) * Math.Tan(epsr / 2), v11.Y - re * Math.Sin(epsr) * Math.Tan(epsr / 2));
            Vector2 v4 = new Vector2(v11.X + re * Math.Tan(epsr / 2), v11.Y);
            Vector2 v6 = new Vector2(v12.X + re * Math.Cos(epsr) / Math.Tan(epsr / 2), v12.Y + re * Math.Sin(epsr) / Math.Tan(epsr / 2));
            Vector2 v7 = new Vector2(v12.X + re / Math.Tan(epsr / 2), v12.Y);
            Vector2 v8 = new Vector2(v13.X - re * Math.Tan(epsr / 2), v13.Y);
            Vector2 v9 = new Vector2(v13.X + re * Math.Cos(epsr) * Math.Tan(epsr / 2), v13.Y + re * Math.Sin(epsr) * Math.Tan(epsr / 2));
            Vector2 v22 = new Vector2(-ic / 2 * Math.Cos((pi - epsr) / 2), ic / 2 * Math.Sin((pi - epsr) / 2));
            Vector2 v23 = new Vector2(ic / 2 * Math.Cos((pi - epsr) / 2), -ic / 2 * Math.Sin((pi - epsr) / 2));
            Vector2 v24 = new Vector2(v4.X - re * Math.Sin(epsr / 2), v4.Y - re + re * Math.Cos(epsr / 2));
            //侧视图
            Vector2 v14 = new Vector2(v10.X + 30, v1.Y);
            Vector2 v15 = new Vector2(v14.X + s1, v14.Y);
            Vector2 v16 = new Vector2(v15.X, ic / 2 - lbb);
            Vector2 v18 = new Vector2(v14.X + s, ic / 2);
            Vector2 v17 = new Vector2(v16.X - (v16.X - v18.X + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Cos(gan), v16.Y + (v16.X - v18.X + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) + (v16.X - v18.X + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Sin(gan));
            Vector2 v19 = new Vector2(v14.X, v18.Y - s * Math.Tan(as1));
            Vector2 v20 = new Vector2(v14.X - 2, v15.Y);
            Vector2 v21 = new Vector2(v15.X + 2, v15.Y);
            //线段
            //主视图
            Vector2[] Line1 = { v3, v4 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v9 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v7, v8 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Arc Arc3 = new Arc(new Vector2(v4.X, v4.Y - re), re, 90, 90 + epsr / pi * 180);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v4));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v6));
            Arc4.Vertexes.Add(new LwPolylineVertex(v7));
            Arc4.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v8));
            Arc5.Vertexes.Add(new LwPolylineVertex(v9));
            Arc5.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            Circle circle1 = new Circle(v1, ic / 2);
            Vector2[] Line7 = { new Vector2(0, ic / 2 + 2), new Vector2(0, -ic / 2 - 2) };
            fun.drawPlinetype(dxf, Line7, 0.15, centre, Linetype.Center);
            Vector2[] Line8 = { new Vector2(ic / 2 + 2, 0), new Vector2(-ic / 2 - 2, 0) };
            fun.drawPlinetype(dxf, Line8, 0.15, centre, Linetype.Center);
            //侧视图
            Vector2[] Line11 = { v15, v14 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v15, v16 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v14, v19 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v20, v21 };
            fun.drawPlinetype(dxf, Line14, 0.15, centre, Linetype.Center);
            Vector2[] Line15 = { v18, v19 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v17, v18 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            Arc6.Vertexes.Add(new LwPolylineVertex(v16));
            Arc6.Vertexes[0].Bulge = Math.Tan((pi / 2 + gan) / 4);
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            //主视图图层
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            //主视图
            dxf.AddEntity(circle1);
            //填充
            LwPolyline hatchpoly1 = new LwPolyline();
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v16));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v17));
            hatchpoly1.Vertexes[0].Bulge = -Math.Tan((pi / 2 + gan) / 4);
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v18));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v19));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v14));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v15));
            hatchpoly1.IsClosed = true;
            String[] htype1 = new String[100];
            Line[] hline1 = new Line[100];
            Arc[] harc1 = new Arc[100];
            int hnumst1 = hatchpoly1.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst1; i++)
            {
                htype1[i] = hatchpoly1.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype1[i] == "Line")
                {
                    hline1[i] = (Line)hatchpoly1.Explode()[i];
                }
                if (htype1[i] == "Arc")
                {
                    harc1[i] = (Arc)hatchpoly1.Explode()[i];
                }
            }
            fun.hatchsub1(dxf, htype1, hnumst1, 45, 5, hline1, harc1, hatching);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(v14, v15), -offset, 0, dimensionStyle);
            dim1.UserText = "S1";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(v22, v23), l * Math.Cos(epsr / 2) + offset, -(pi - epsr) / 2 / pi * 180, dimensionStyle);
            dim2.UserText = "IC";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(v22, v24), l * Math.Cos(epsr / 2) + offset, -(pi - epsr) / 2 / pi * 180, dimensionStyle);
            dim3.UserText = "M";
            dxf.AddEntity(dim3);
            //尺寸4
            RadialDimension dimrad4 = new RadialDimension(Arc3, ((pi - epsr) / 2 + epsr) / pi * 180, offset, dimensionStyle);//DimensionStyle.Default);
            dimrad4.UserText = "RE";
            dxf.AddEntity(dimrad4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(v6, v9), -re - offset, 0, dimensionStyle);
            dim5.UserText = "L";
            dxf.AddEntity(dim5);
            //尺寸6
            LinearDimension dim6 = new LinearDimension(new Line(v18, v19), offset + v18.Y - v19.Y, 0, dimensionStyle);
            dim6.UserText = "S";
            dxf.AddEntity(dim6);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE3(Dictionary<string, Object> data)//ISO 13399-2图片E.3
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double ic = 12.7;
            double epsr = 60 * pi / 180;
            double re = 0.8;
            double l = ic * Math.Tan(epsr);
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v10 = new Vector2(l / 2, -ic / 2);
            Vector2 v9 = new Vector2(0, l * Math.Sin(epsr) - ic / 2);
            Vector2 v8 = new Vector2(-v10.X, v10.Y);
            Vector2 v2 = new Vector2(v10.X - re * Math.Tan(epsr), v10.Y);
            Vector2 v3 = new Vector2(v2.X + re * Math.Sin(epsr), v2.Y + re + re * Math.Cos(epsr));
            Vector2 v4 = new Vector2(re * Math.Sin(epsr), v9.Y - re / Math.Cos(epsr) + re * Math.Cos(epsr));
            Vector2 v5 = new Vector2(-v4.X, v4.Y);
            Vector2 v6 = new Vector2(-v3.X, v3.Y);
            Vector2 v7 = new Vector2(-v2.X, v2.Y);
            //线段
            //主视图
            Vector2[] Line1 = { v3, v4 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v7 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Arc Arc3 = new Arc(new Vector2(0, v9.Y - re / Math.Cos(epsr)), re, (pi / 2 - epsr) / pi * 180, 90 + epsr / pi * 180);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = Math.Tan((pi - epsr) / 4);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v4));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = Math.Tan((pi - epsr) / 4);
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v6));
            Arc4.Vertexes.Add(new LwPolylineVertex(v7));
            Arc4.Vertexes[0].Bulge = Math.Tan((pi - epsr) / 4);
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Circle circle1 = new Circle(v1, ic / 2);
            Vector2[] Line7 = { new Vector2(0, ic / 2 + 2), new Vector2(0, -ic / 2 - 2) };
            fun.drawPlinetype(dxf, Line7, 0.15, centre, Linetype.Center);
            Vector2[] Line8 = { new Vector2(ic / 2 + 2, 0), new Vector2(-ic / 2 - 2, 0) };
            fun.drawPlinetype(dxf, Line8, 0.15, centre, Linetype.Center);
            //主视图图层
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            //主视图
            dxf.AddEntity(circle1);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(0, ic / 2), v10), v10.X / 2 + offset, 270, dimensionStyle);
            dim2.UserText = "IC";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(0, v9.Y - re / Math.Cos(epsr) + re), v10), v10.X / 2 + offset * 2, 270, dimensionStyle);
            dim3.UserText = "M";
            dxf.AddEntity(dim3);
            //尺寸4
            RadialDimension dimrad4 = new RadialDimension(Arc3, 120, offset, dimensionStyle);//DimensionStyle.Default);
            dimrad4.UserText = "RE";
            dxf.AddEntity(dimrad4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(v8, v10), -offset, 0, dimensionStyle);
            dim5.UserText = "L";
            dxf.AddEntity(dim5);
            //尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v10, v9), new Line(v10, v8), offset + l * Math.Sin(epsr), dimensionStyle);
            angdim1.UserText = "EPSR";
            dxf.AddEntity(angdim1);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE4(Dictionary<string, Object> data)//ISO 13399-2图片E.4
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double ic = 12.7;
            double epsr = 80 * pi / 180;
            double re = 0.8;
            double ren = 0.8;
            double l = ic / Math.Sin(epsr);
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v10 = new Vector2(l * Math.Cos(epsr) + ic / 2 * Math.Tan(epsr / 2), l * Math.Sin(epsr) - ic / 2);
            Vector2 v11 = new Vector2(v10.X - l, v10.Y);
            Vector2 v12 = new Vector2(v11.X - l * Math.Cos(epsr), v11.Y - ic);
            Vector2 v13 = new Vector2(v10.X - l * Math.Cos(epsr), v12.Y);
            Vector2 v2 = new Vector2(v10.X - re * Math.Cos(epsr) / Math.Tan(epsr / 2), v10.Y - re * Math.Sin(epsr) / Math.Tan(epsr / 2));
            Vector2 v3 = new Vector2(v10.X - re / Math.Tan(epsr / 2), v10.Y);
            Vector2 v5 = new Vector2(v11.X - ren * Math.Cos(epsr) * Math.Tan(epsr / 2), v11.Y - ren * Math.Sin(epsr) * Math.Tan(epsr / 2));
            Vector2 v4 = new Vector2(v11.X + ren * Math.Tan(epsr / 2), v11.Y);
            Vector2 v6 = new Vector2(v12.X + re * Math.Cos(epsr) / Math.Tan(epsr / 2), v12.Y + re * Math.Sin(epsr) / Math.Tan(epsr / 2));
            Vector2 v7 = new Vector2(v12.X + re / Math.Tan(epsr / 2), v12.Y);
            Vector2 v8 = new Vector2(v13.X - ren * Math.Tan(epsr / 2), v13.Y);
            Vector2 v9 = new Vector2(v13.X + ren * Math.Cos(epsr) * Math.Tan(epsr / 2), v13.Y + ren * Math.Sin(epsr) * Math.Tan(epsr / 2));
            Vector2 v14 = new Vector2(v7.X - re * Math.Sin((pi - epsr) / 2), v7.Y + re - re * Math.Cos((pi - epsr) / 2));
            Vector2 v15 = new Vector2(-ic / 2 * Math.Sin((pi - epsr) / 2), -ic / 2 * Math.Cos((pi - epsr) / 2));
            Vector2 v16 = new Vector2(ic / 2 * Math.Cos((pi - epsr) / 2), -ic / 2 * Math.Sin((pi - epsr) / 2));
            Vector2 v17 = new Vector2(v8.X + ren * Math.Sin(epsr / 2), v8.Y + ren - ren * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v4.X - ren * Math.Sin(epsr / 2), v4.Y - ren + ren * Math.Cos(epsr / 2));
            Vector2 v19 = new Vector2(v12.X - 10, v12.Y);
            Vector2 v20 = new Vector2(v12.X - 10 * Math.Cos(epsr), v12.Y - 10 * Math.Sin(epsr));
            //线段
            //主视图
            Vector2[] Line1 = { v3, v4 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v9 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v7, v8 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Arc Arc3 = new Arc(new Vector2(v7.X, v7.Y + re), re, 90 + epsr / pi * 180, -90);
            Arc Arc6 = new Arc(new Vector2(v8.X, v8.Y + ren), ren, -90, -90 + epsr / pi * 180);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v4));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v6));
            Arc4.Vertexes.Add(new LwPolylineVertex(v7));
            Arc4.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v8));
            Arc5.Vertexes.Add(new LwPolylineVertex(v9));
            Arc5.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            Circle circle1 = new Circle(v1, ic / 2);
            Vector2[] Line7 = { v11, v13 };
            fun.drawPlinetype(dxf, Line7, 0.15, centre, Linetype.Center);
            Vector2[] Line8 = { v10, v12 };
            fun.drawPlinetype(dxf, Line8, 0.15, centre, Linetype.Center);
            Line line9 = new Line(v12, v19);
            Line line10 = new Line(v12, v20);
            //主视图图层
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            line9.Layer = dimensioning;
            line10.Layer = dimensioning;
            //主视图
            dxf.AddEntity(circle1);
            dxf.AddEntity(line9);
            dxf.AddEntity(line10);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(v16, v17), l * Math.Cos(epsr / 2) + offset, -(pi - epsr) / 2 / pi * 180, dimensionStyle);
            dim1.UserText = "M2";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(v18, v16), l * Math.Cos(epsr / 2) + offset, -(pi - epsr) / 2 / pi * 180, dimensionStyle);
            dim2.UserText = "IC";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(v14, v15), -l * Math.Sin(epsr / 2) - offset, epsr / 2 / pi * 180, dimensionStyle);
            dim3.UserText = "M";
            dxf.AddEntity(dim3);
            //尺寸4
            RadialDimension dimrad4 = new RadialDimension(Arc3, epsr / 4 / pi * 180, offset, dimensionStyle);//DimensionStyle.Default);
            dimrad4.UserText = "RE";
            dxf.AddEntity(dimrad4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(v11, v12), offset, epsr / pi * 180, dimensionStyle);
            dim5.UserText = "L";
            dxf.AddEntity(dim5);
            //尺寸6
            RadialDimension dimrad6 = new RadialDimension(Arc6, -90 + epsr / 2 / pi * 180, offset, dimensionStyle);//DimensionStyle.Default);
            dimrad6.UserText = "REN";
            dxf.AddEntity(dimrad6);
            //尺寸7
            Angular2LineDimension angdim7 = new Angular2LineDimension(line9, line10, offset, dimensionStyle);
            angdim7.UserText = "EPSR";
            dxf.AddEntity(angdim7);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE5(Dictionary<string, Object> data)//ISO 13399-2图片E.5
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double ic = 12.7;
            double bs = 1.5;
            double bch = 1;
            double epsr = 60 * pi / 180;
            double kch = 45 * pi / 180;
            double krins = 85 * pi / 180;
            double l = ic * Math.Tan(epsr);
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(ic / 2, l / 2);
            Vector2 v3 = new Vector2(-l * Math.Sin(epsr) + ic / 2, 0);
            Vector2 v4 = new Vector2(v2.X, -l / 2);
            Vector2 v11 = new Vector2(v4.X - bs * Math.Sin(krins) - bch * Math.Sin(kch), (bs * Math.Sin(krins) + bch * Math.Sin(kch)) / Math.Tan(epsr) + v4.Y);
            Vector2 v12 = new Vector2(v4.X - bch * Math.Sin(kch), v11.Y + bs * Math.Cos(krins));
            Vector2 v13 = new Vector2(v4.X, v12.Y + bch * Math.Cos(kch));
            Vector2 v7 = new Vector2(v2.X - bs * Math.Sin(pi - krins - epsr) - bch * Math.Sin(pi - kch - epsr), v2.Y - (bs * Math.Sin(pi - krins - epsr) + bch * Math.Sin(pi - kch - epsr)) / Math.Tan(epsr));
            Vector2 v6 = new Vector2(v7.X + bch * Math.Sin(pi - kch - epsr), v7.Y - bch * Math.Cos(pi - kch - epsr));
            Vector2 v5 = new Vector2(v2.X, v6.Y - bs * Math.Cos(pi - krins - epsr));
            Vector2 v10 = new Vector2(bs * Math.Sin(pi - krins - epsr) + bch * Math.Sin(pi - kch - epsr) + v3.X, v3.Y - (bs * Math.Sin(pi - krins - epsr) + bch * Math.Sin(pi - kch - epsr)) / Math.Sin(epsr) * Math.Cos(epsr));
            Vector2 v9 = new Vector2(v10.X - bch * Math.Sin(epsr - kch), v10.Y + bch * Math.Cos(epsr - kch));
            Vector2 v8 = new Vector2(v9.X + bs * Math.Sin(epsr * 2 - pi + krins), v9.Y + bs * Math.Cos(epsr * 2 - pi + krins));
            Vector2 v14 = new Vector2(v13.X, v13.Y + 5);
            Vector2 v15 = new Vector2(v14.X + 5 * Math.Tan(kch), v14.Y);
            Vector2 v16 = new Vector2(v4.X + 10 * Math.Sin(krins), v11.Y + (v13.X - v11.X) / Math.Tan(krins) + 10 * Math.Cos(krins));
            Vector2 v18 = new Vector2(v2.X, v2.Y + 5);
            Vector2 v17 = new Vector2(v18.X + 5 * Math.Tan(epsr), v18.Y);
            //线段
            //主视图
            Vector2[] Line1 = { v7, v8 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v5, v13 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v10, v11 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v5, v6 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Vector2[] Line5 = { v7, v6 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v8, v9 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            Vector2[] Line7 = { v9, v10 };
            fun.drawBLine(dxf, Line7, 0.3, contour);
            Vector2[] Line8 = { v11, v12 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            Vector2[] Line9 = { v12, v13 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Circle circle1 = new Circle(v1, ic / 2);
            Line line10 = new Line(v12, v16);
            Line line11 = new Line(v5, v18);
            Line line12 = new Line(v7, v17);
            Line line13 = new Line(v13, v15);
            //主视图图层
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            line10.Layer = dimensioning;
            line11.Layer = dimensioning;
            line12.Layer = dimensioning;
            line13.Layer = dimensioning;
            //主视图
            dxf.AddEntity(circle1);
            dxf.AddEntity(line10);
            dxf.AddEntity(line11);
            dxf.AddEntity(line12);
            dxf.AddEntity(line13);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(v11, v12), -offset, (pi / 2 - krins) / pi * 180, dimensionStyle);
            dim1.UserText = "BS";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(0, ic / 2), new Vector2(0 - ic / 2)), -l * Math.Sin(epsr) + ic / 2 - offset, 270, dimensionStyle);
            dim2.UserText = "IC";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(0, -ic / 2), v11), -offset + v11.X / 2 - (v11.X - v3.X), 270, dimensionStyle);
            dim3.UserText = "M";
            dxf.AddEntity(dim3);
            //尺寸4
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v2, v18), new Line(v2, v17), offset, dimensionStyle);
            angdim4.UserText = "EPSR";
            dxf.AddEntity(angdim4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(v12, v13), -offset, (pi / 2 - kch) / pi * 180, dimensionStyle);
            dim5.UserText = "BCH";
            dxf.AddEntity(dim5);
            //尺寸6
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v13, v14), new Line(v13, v15), offset, dimensionStyle);
            angdim6.UserText = "KCH";
            dxf.AddEntity(angdim6);
            //尺寸7
            Angular2LineDimension angdim7 = new Angular2LineDimension(new Line(v4, v14), new Line(v12, v16), offset * 2, dimensionStyle);
            angdim7.UserText = "KRINS";
            dxf.AddEntity(angdim7);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE6(Dictionary<string, Object> data)//ISO 13399-2图片E.6
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double s1 = 3.175;
            double s = 3;
            double an = 7 * pi / 180;
            double gan = 11 * pi / 180;
            double lbb = 3;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v3 = new Vector2(lbb, s1 - s);
            Vector2 v2 = new Vector2(v3.X - (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) - (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Sin(gan), v3.Y - (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Cos(gan));
            Vector2 v4 = new Vector2(v3.X + 5, v3.Y);
            Vector2 v5 = new Vector2(v4.X, v4.Y - s1);
            Vector2 v6 = new Vector2(s * Math.Tan(an), v5.Y);
            Vector2 v7 = new Vector2(v1.X, v6.Y);
            Vector2 v8 = new Vector2(-5, 0);
            Vector2 v9 = new Vector2(v8.X, 5 * Math.Tan(gan));
            //线段
            //主视图
            Vector2[] Line1 = { v3, v4 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v1 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v4, v5 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = Math.Tan((gan + pi / 2) / 4);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line5 = { v1, v6 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Line line6 = new Line(v1, v8);
            Line line7 = new Line(v1, v9);
            Line line8 = new Line(v1, v7);
            //主视图图层
            line6.Layer = dimensioning;
            line7.Layer = dimensioning;
            line8.Layer = dimensioning;
            //主视图
            dxf.AddEntity(line6);
            dxf.AddEntity(line7);
            dxf.AddEntity(line8);
            //填充
            LwPolyline hatchpoly1 = new LwPolyline();
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v2));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v3));
            hatchpoly1.Vertexes[0].Bulge = Math.Tan((pi / 2 + gan) / 4);
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v4));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v5));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v6));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v1));
            hatchpoly1.IsClosed = true;
            String[] htype1 = new String[100];
            Line[] hline1 = new Line[100];
            Arc[] harc1 = new Arc[100];
            int hnumst1 = hatchpoly1.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst1; i++)
            {
                htype1[i] = hatchpoly1.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype1[i] == "Line")
                {
                    hline1[i] = (Line)hatchpoly1.Explode()[i];
                }
                if (htype1[i] == "Arc")
                {
                    harc1[i] = (Arc)hatchpoly1.Explode()[i];
                }
            }
            fun.hatchsub1(dxf, htype1, hnumst1, 45, 5, hline1, harc1, hatching);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(v1, v3), v3.Y / 2 + offset, 0, dimensionStyle);
            dim2.UserText = "LBB";
            dxf.AddEntity(dim2);
            //尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(line6, line7, offset, dimensionStyle);
            angdim1.UserText = "GAN";
            dxf.AddEntity(angdim1);
            //尺寸3
            Angular2LineDimension angdim4 = new Angular2LineDimension(line8, new Line(v1, v6), offset, dimensionStyle);
            angdim4.UserText = "AN";
            dxf.AddEntity(angdim4);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE7(Dictionary<string, Object> data)//ISO 13399-2图片E.7
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double s1 = 3.175;
            double s = 3;
            double an = 7 * pi / 180;
            double gan = 11 * pi / 180;
            double lbb = 3;
            double gb = 30 * pi / 180;
            double bn = 0.6;
            double bn2 = 0.5;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v3 = new Vector2(lbb, s1 - s);
            Vector2 v2 = new Vector2(v3.X - (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) - (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Sin(gan), v3.Y - (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Cos(gan));
            Vector2 v4 = new Vector2(v3.X + 5, v3.Y);
            Vector2 v5 = new Vector2(v4.X, v4.Y - s1);
            Vector2 v6 = new Vector2(s * Math.Tan(an), v5.Y);
            Vector2 v7 = new Vector2(v1.X, v6.Y);
            Vector2 v8 = new Vector2(-5, 0);
            Vector2 v9 = new Vector2(v8.X, 5 * Math.Tan(gan));
            Vector2 v10 = new Vector2((-bn * Math.Tan(gan) - bn2 * Math.Tan(gan) - bn * Math.Tan(gb)) / (Math.Tan(gan) - 1 / Math.Tan(an)), -(-bn * Math.Tan(gan) - bn2 * Math.Tan(gan) - bn * Math.Tan(gb)) / (Math.Tan(gan) - 1 / Math.Tan(an)) / Math.Tan(an));
            Vector2 v11 = new Vector2(v10.X + bn, v10.Y + bn * Math.Tan(gb));
            Vector2 v12 = new Vector2(v11.X + bn2, v11.Y);
            //线段
            //主视图
            Vector2[] Line1 = { v3, v4 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v12 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v4, v5 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = Math.Tan((gan + pi / 2) / 4);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line5 = { v10, v6 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Line line6 = new Line(v12, v8);
            Line line7 = new Line(v12, v9);
            Line line8 = new Line(v10, v7);
            Vector2[] Line9 = { v10, v11 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Vector2[] Line10 = { v11, v12 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            //主视图图层
            line6.Layer = dimensioning;
            line7.Layer = dimensioning;
            line8.Layer = dimensioning;
            //主视图
            dxf.AddEntity(line6);
            dxf.AddEntity(line7);
            dxf.AddEntity(line8);
            //填充
            LwPolyline hatchpoly1 = new LwPolyline();
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v2));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v3));
            hatchpoly1.Vertexes[0].Bulge = Math.Tan((pi / 2 + gan) / 4);
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v4));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v5));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v6));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v10));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v11));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v12));
            hatchpoly1.IsClosed = true;
            String[] htype1 = new String[100];
            Line[] hline1 = new Line[100];
            Arc[] harc1 = new Arc[100];
            int hnumst1 = hatchpoly1.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst1; i++)
            {
                htype1[i] = hatchpoly1.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype1[i] == "Line")
                {
                    hline1[i] = (Line)hatchpoly1.Explode()[i];
                }
                if (htype1[i] == "Arc")
                {
                    harc1[i] = (Arc)hatchpoly1.Explode()[i];
                }
            }
            fun.hatchsub1(dxf, htype1, hnumst1, 45, 5, hline1, harc1, hatching);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(v12, v11), v3.Y - v11.Y + offset, 0, dimensionStyle);
            dim1.UserText = "BN2";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(v10, v11), v3.Y - (v10.Y + v11.Y) / 2 + offset / 2, 0, dimensionStyle);
            dim2.UserText = "BN";
            dxf.AddEntity(dim2);
            //尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(line6, line7, offset, dimensionStyle);
            angdim1.UserText = "GAN";
            dxf.AddEntity(angdim1);
            //尺寸3
            Angular2LineDimension angdim4 = new Angular2LineDimension(line8, new Line(v10, v6), offset, dimensionStyle);
            angdim4.UserText = "AN";
            dxf.AddEntity(angdim4);
            //尺寸4
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v11, v8), new Line(v11, v10), offset, dimensionStyle);
            angdim5.UserText = "GB";
            dxf.AddEntity(angdim5);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE8(Dictionary<string, Object> data)//ISO 13399-2图片E.8
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double ic = 12.7;
            double bs = 1.5;
            double bch = 1;
            double epsr = 60 * pi / 180;
            double kch = 45 * pi / 180;
            double krins = 90 * pi / 180;
            double s = 4.76;
            double an = 11 * pi / 180;
            double as1 = 11 * pi / 180;
            double l = ic * Math.Tan(epsr);
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(ic / 2, l / 2);
            Vector2 v3 = new Vector2(-l * Math.Sin(epsr) + ic / 2, 0);
            Vector2 v4 = new Vector2(v2.X, -l / 2);
            Vector2 v11 = new Vector2(v4.X - bs * Math.Sin(krins) - bch * Math.Sin(kch), (bs * Math.Sin(krins) + bch * Math.Sin(kch)) / Math.Tan(epsr) + v4.Y);
            Vector2 v12 = new Vector2(v4.X - bch * Math.Sin(kch), v11.Y + bs * Math.Cos(krins));
            Vector2 v13 = new Vector2(v4.X, v12.Y + bch * Math.Cos(kch));
            Vector2 v7 = new Vector2(v2.X - bs * Math.Sin(pi - krins - epsr) - bch * Math.Sin(pi - kch - epsr), v2.Y - (bs * Math.Sin(pi - krins - epsr) + bch * Math.Sin(pi - kch - epsr)) / Math.Tan(epsr));
            Vector2 v6 = new Vector2(v7.X + bch * Math.Sin(pi - kch - epsr), v7.Y - bch * Math.Cos(pi - kch - epsr));
            Vector2 v5 = new Vector2(v2.X, v6.Y - bs * Math.Cos(pi - krins - epsr));
            Vector2 v10 = new Vector2(bs * Math.Sin(pi - krins - epsr) + bch * Math.Sin(pi - kch - epsr) + v3.X, v3.Y - (bs * Math.Sin(pi - krins - epsr) + bch * Math.Sin(pi - kch - epsr)) / Math.Sin(epsr) * Math.Cos(epsr));
            Vector2 v9 = new Vector2(v10.X - bch * Math.Sin(epsr - kch), v10.Y + bch * Math.Cos(epsr - kch));
            Vector2 v8 = new Vector2(v9.X + bs * Math.Sin(epsr * 2 - pi + krins), v9.Y + bs * Math.Cos(epsr * 2 - pi + krins));
            //前视图
            Vector2 v16 = new Vector2(v2.X, v2.Y + 20 + s);
            Vector2 v15 = new Vector2(v1.X, v16.Y);
            Vector2 v14 = new Vector2(v15.X, v15.Y - s);
            Vector2 v17 = new Vector2(v16.X - s * Math.Tan(an), v14.Y);
            //斜视图
            Vector2 v18 = new Vector2(v3.X - (30 + s) * Math.Sin(epsr), v3.Y + (30 + s) * Math.Cos(epsr));
            Vector2 v19 = new Vector2(v18.X + s / Math.Cos(an) * Math.Sin(epsr + an), v18.Y - s / Math.Cos(an) * Math.Cos(epsr + an));
            Vector2 v21 = new Vector2(v18.X + ic / 2 * Math.Cos(epsr), v18.Y + ic / 2 * Math.Sin(epsr));
            Vector2 v20 = new Vector2(v21.X + s * Math.Sin(epsr), v21.Y - s * Math.Cos(epsr));
            //修光刃右视图
            Vector2 v22 = new Vector2(v18.X, v11.Y - (v11.X - v18.X) / Math.Tan(krins));
            Vector2 v23 = new Vector2(v22.X + s / Math.Cos(as1) * Math.Sin(krins - as1), v22.Y + s / Math.Cos(as1) * Math.Cos(krins - as1));
            Vector2 v25 = new Vector2(v22.X - ic / 2 * Math.Cos(krins), v22.Y + ic / 2 * Math.Sin(krins));
            Vector2 v24 = new Vector2(v25.X + s * Math.Sin(krins), v25.Y + s * Math.Cos(krins));
            //线段
            //主视图
            Vector2[] Line1 = { v7, v8 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v5, v13 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v10, v11 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v5, v6 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Vector2[] Line5 = { v7, v6 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v8, v9 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            Vector2[] Line7 = { v9, v10 };
            fun.drawBLine(dxf, Line7, 0.3, contour);
            Vector2[] Line8 = { v11, v12 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            Vector2[] Line9 = { v12, v13 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Circle circle1 = new Circle(v1, ic / 2);
            //前视图
            Vector2[] Line10 = { v15, v16 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v16, v17 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v17, v14 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { new Vector2(v15.X, v15.Y + 2), new Vector2(v14.X, v14.Y - 2) };
            fun.drawPlinetype(dxf, Line13, 0.15, centre, Linetype.Center);
            Line line14 = new Line(v16, v5);
            //斜视图
            Vector2[] Line15 = { v18, v19 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v19, v20 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            Vector2[] Line17 = { v21, v18 };
            fun.drawBLine(dxf, Line17, 0.3, contour);
            Vector2[] Line18 = { new Vector2(v21.X - 2 * Math.Sin(epsr), v21.Y + 2 * Math.Cos(epsr)), new Vector2(v20.X + 2 * Math.Sin(epsr), v20.Y - 2 * Math.Cos(epsr)) };
            fun.drawPlinetype(dxf, Line18, 0.15, centre, Linetype.Center);
            Line line19 = new Line(v18, v10);
            //修光刃右视图
            Vector2[] Line20 = { v22, v23 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            Vector2[] Line21 = { v23, v24 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            Vector2[] Line22 = { v25, v22 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            Vector2[] Line23 = { new Vector2(v25.X - 2 * Math.Sin(krins), v25.Y - 2 * Math.Cos(krins)), new Vector2(v24.X + 2 * Math.Sin(krins), v24.Y + 2 * Math.Cos(krins)) };
            fun.drawPlinetype(dxf, Line23, 0.15, centre, Linetype.Center);
            Line line24 = new Line(v22, v11);
            //主视图图层
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            //前视图图层
            line14.Layer = dimensioning;
            //斜视图图层
            line19.Layer = dimensioning;
            //修光刃右视图图层
            line24.Layer = dimensioning;
            //主视图
            dxf.AddEntity(circle1);
            //前视图
            dxf.AddEntity(line14);
            //斜视图
            dxf.AddEntity(line19);
            //修光刃右视图
            dxf.AddEntity(line24);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //主视图
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(v11, v12), -offset, (pi / 2 - krins) / pi * 180, dimensionStyle);
            dim1.UserText = "BS";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(0, ic / 2), new Vector2(0 - ic / 2)), -l * Math.Sin(epsr) + ic / 2 - offset, 270, dimensionStyle);
            dim2.UserText = "IC";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(0, -ic / 2), v11), -offset + v11.X / 2 - (v11.X - v3.X), 270, dimensionStyle);
            dim3.UserText = "M";
            dxf.AddEntity(dim3);
            //前视图
            //尺寸4
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v16, v17), new Line(v16, new Vector2(v16.X, v17.Y)), offset, dimensionStyle);
            angdim4.UserText = "AN";
            dxf.AddEntity(angdim4);
            //斜视图
            //尺寸6
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v18, v19), new Line(v18, new Vector2(v19.X - s * Math.Tan(an) * Math.Cos(epsr), v19.Y - s * Math.Tan(an) * Math.Sin(epsr))), offset, dimensionStyle);
            angdim6.UserText = "AN";
            dxf.AddEntity(angdim6);
            //修光刃右视图
            //尺寸7
            Angular2LineDimension angdim7 = new Angular2LineDimension(new Line(v22, v23), new Line(v22, new Vector2(v22.X + s * Math.Sin(krins), v22.Y + s * Math.Cos(krins))), offset, dimensionStyle);
            angdim7.UserText = "AS";
            dxf.AddEntity(angdim7);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE9(Dictionary<string, Object> data)//ISO 13399-2图片E.9
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double s1 = 3.175;
            double s = 3;
            double an = 0 * pi / 180;
            double gan = 11 * pi / 180;
            double lbb = 3;
            double w1 = 15;
            double l = 25;
            double le = 20;
            double re = 2;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v3 = new Vector2(-lbb, s1 - s);
            Vector2 v2 = new Vector2(v3.X + (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) + (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Sin(gan), v3.Y - (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Cos(gan));
            Vector2 v4 = new Vector2(-w1, v3.Y);
            Vector2 v5 = new Vector2(v4.X + s * Math.Tan(an), v4.Y - s1);
            Vector2 v6 = new Vector2(-s * Math.Tan(an), v5.Y);
            //俯视图
            Vector2 v7 = new Vector2(v1.X, v6.Y - 20 - re);
            Vector2 v8 = new Vector2(v7.X - re, v7.Y + re);
            Vector2 v9 = new Vector2(v7.X - w1 + re, v8.Y);
            Vector2 v10 = new Vector2(v7.X - w1, v7.Y);
            Vector2 v11 = new Vector2(v10.X, v8.Y - l + re);
            Vector2 v12 = new Vector2(v9.X, v8.Y - l);
            Vector2 v13 = new Vector2(v8.X, v12.Y);
            Vector2 v14 = new Vector2(v7.X, v11.Y);
            Vector2 v15 = new Vector2(v7.X, v13.Y + le);
            Vector2 v16 = new Vector2(v15.X - lbb, v15.Y - lbb);
            Vector2 v17 = new Vector2(v16.X, v13.Y);
            Vector2 v18 = new Vector2(v11.X, v9.Y - le);
            Vector2 v19 = new Vector2(v18.X + lbb, v18.Y + lbb);
            Vector2 v20 = new Vector2(v19.X, v9.Y);
            //线段
            //主视图
            Vector2[] Line1 = { v3, v4 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v1 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v4, v5 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = -Math.Tan((gan + pi / 2) / 4);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line5 = { v1, v6 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            //俯视图
            Line line6 = new Line(new Vector2(v14.X, v13.Y), new Vector2(v14.X + 10, v13.Y));
            Line line7 = new Line(new Vector2(v14.X, v13.Y), new Vector2(v14.X, v13.Y - 10));
            Arc arc8 = new Arc(new Vector2(v13.X, v14.Y), re, 0, -90);
            Vector2[] Line9 = { v8, v9 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Vector2[] Line10 = { v10, v11 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v12, v13 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v14, v7 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v16, v17 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v19, v20 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v7));
            Arc15.Vertexes.Add(new LwPolylineVertex(v8));
            Arc15.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v9));
            Arc16.Vertexes.Add(new LwPolylineVertex(v10));
            Arc16.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v11));
            Arc17.Vertexes.Add(new LwPolylineVertex(v12));
            Arc17.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc17, 0.3, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v13));
            Arc18.Vertexes.Add(new LwPolylineVertex(v14));
            Arc18.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc18, 0.3, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v15));
            Arc19.Vertexes.Add(new LwPolylineVertex(v16));
            Arc19.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc19, 0.3, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v18));
            Arc20.Vertexes.Add(new LwPolylineVertex(v19));
            Arc20.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc20, 0.3, contour);
            //俯视图图层
            line6.Layer = dimensioning;
            line7.Layer = dimensioning;
            //俯视图
            dxf.AddEntity(line6);
            dxf.AddEntity(line7);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(v1, v6), -v6.X / 2 + offset, 270, dimensionStyle);
            dim2.UserText = "S";
            dxf.AddEntity(dim2);
            //尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(line6, line7, offset, dimensionStyle);
            angdim1.UserText = "EPSR";
            dxf.AddEntity(angdim1);
            //尺寸3
            RadialDimension dimrad4 = new RadialDimension(arc8, -45, offset / 2, dimensionStyle);//DimensionStyle.Default);
            dimrad4.UserText = "RE";
            dxf.AddEntity(dimrad4);
            //尺寸4
            LinearDimension dim4 = new LinearDimension(new Line(v15, v13), (v15.X - v13.X) / 2 + offset, 270, dimensionStyle);
            dim4.UserText = "LE";
            dxf.AddEntity(dim4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(v13, v8), re + offset * 2, 270, dimensionStyle);
            dim5.UserText = "L";
            dxf.AddEntity(dim5);
            //尺寸6
            LinearDimension dim6 = new LinearDimension(new Line(v11, v14), -offset, 0, dimensionStyle);
            dim6.UserText = "W1";
            dxf.AddEntity(dim6);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE10(Dictionary<string, Object> data)//ISO 13399-2图片E.10
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double s1 = 3.175;
            double s = 3;
            double an = 5 * pi / 180;
            double ann = 7 * pi / 180;
            double gan = 11 * pi / 180;
            double epsr = 60 * pi / 180;
            double lbb = 3.5;
            double w1 = 15;
            double l = 25;
            double le = 20;
            double re = 2;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v3 = new Vector2(-lbb, s1 - s);
            Vector2 v2 = new Vector2(v3.X + (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) + (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Sin(gan), v3.Y - (v3.Y - v1.Y + lbb * Math.Tan(gan)) * Math.Tan((pi / 2 - gan) / 2) * Math.Cos(gan));
            Vector2 v4 = new Vector2(-w1, v3.Y);
            Vector2 v5 = new Vector2(v4.X + s * Math.Tan(an), v4.Y - s1);
            Vector2 v6 = new Vector2(-s * Math.Tan(an), v5.Y);
            Vector2 v21 = new Vector2(v1.X, v6.Y);
            //俯视图
            Vector2 v7 = new Vector2(v1.X, v6.Y - 20 - w1 / Math.Tan(epsr) - re * Math.Tan(epsr / 2));
            Vector2 v8 = new Vector2(v7.X - re * Math.Tan(epsr / 2) * Math.Sin(epsr), v7.Y + re * Math.Tan(epsr / 2) * Math.Cos(epsr) + re * Math.Tan(epsr / 2));
            Vector2 v10 = new Vector2(v7.X - w1, v6.Y - 20 - re / Math.Tan(epsr / 2));
            Vector2 v9 = new Vector2(v10.X + re / Math.Tan(epsr / 2) * Math.Sin(epsr), v6.Y - 20 - re / Math.Tan(epsr / 2) * Math.Cos(epsr));
            Vector2 v11 = new Vector2(v10.X, v6.Y - 20 - l + re * Math.Tan(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + re - re * Math.Cos(epsr), v11.Y - re * Math.Sin(epsr));
            Vector2 v14 = new Vector2(v7.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l + re / Math.Tan(epsr / 2));
            Vector2 v13 = new Vector2(v14.X - re - re * Math.Cos(epsr), v14.Y - re * Math.Sin(epsr));
            Vector2 v15 = new Vector2(v7.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l + le);
            Vector2 v16 = new Vector2(v15.X - lbb, v15.Y - lbb);
            Vector2 v17 = new Vector2(v16.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l + lbb / Math.Tan(epsr));
            Vector2 v18 = new Vector2(v11.X, v6.Y - 20 - le);
            Vector2 v19 = new Vector2(v18.X + lbb, v18.Y + lbb);
            Vector2 v20 = new Vector2(v19.X, v6.Y - 20 - lbb / Math.Tan(epsr));
            //斜视图
            Vector2 v22 = new Vector2(-w1 - (30 + s) * Math.Sin(epsr), v6.Y - 20 - l + (30 + s) * Math.Cos(epsr));
            Vector2 v23 = new Vector2(v22.X + s / Math.Cos(ann) * Math.Sin(epsr + ann), v22.Y - s / Math.Cos(ann) * Math.Cos(epsr + ann));
            Vector2 v25 = new Vector2(v22.X + l * Math.Sin(epsr) / 2 * Math.Cos(epsr), v22.Y + l * Math.Sin(epsr) / 2 * Math.Sin(epsr));
            Vector2 v24 = new Vector2(v25.X + s * Math.Sin(epsr), v25.Y - s * Math.Cos(epsr));
            //线段
            //主视图
            Vector2[] Line1 = { v3, v4 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v1 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v4, v5 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = -Math.Tan((gan + pi / 2) / 4);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line5 = { v1, v6 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Line line8 = new Line(v1, v21);
            //俯视图
            Line line6 = new Line(v13, new Vector2(v14.X + 10 * Math.Sin(epsr), v6.Y - 20 - w1 / Math.Tan(epsr) - l - 10 * Math.Cos(epsr)));
            Line line7 = new Line(v14, new Vector2(v14.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l - 10));
            Arc arc8 = new Arc(new Vector2(v14.X - re, v13.Y + re * Math.Sin(epsr)), re, 0, -180 + epsr / pi * 180);
            Vector2[] Line9 = { v8, v9 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Vector2[] Line10 = { v10, v11 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v12, v13 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v14, v7 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v16, v17 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v19, v20 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v7));
            Arc15.Vertexes.Add(new LwPolylineVertex(v8));
            Arc15.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v9));
            Arc16.Vertexes.Add(new LwPolylineVertex(v10));
            Arc16.Vertexes[0].Bulge = Math.Tan((pi - epsr) / 4);
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v11));
            Arc17.Vertexes.Add(new LwPolylineVertex(v12));
            Arc17.Vertexes[0].Bulge = Math.Tan(epsr / 4);
            fun.PolyFill(dxf, Arc17, 0.3, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v13));
            Arc18.Vertexes.Add(new LwPolylineVertex(v14));
            Arc18.Vertexes[0].Bulge = Math.Tan((pi - epsr) / 4);
            fun.PolyFill(dxf, Arc18, 0.3, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v15));
            Arc19.Vertexes.Add(new LwPolylineVertex(v16));
            Arc19.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc19, 0.3, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v18));
            Arc20.Vertexes.Add(new LwPolylineVertex(v19));
            Arc20.Vertexes[0].Bulge = Math.Tan(pi / 8);
            fun.PolyFill(dxf, Arc20, 0.3, contour);
            //斜视图
            Vector2[] Line21 = { v22, v23 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            Vector2[] Line22 = { v23, v24 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            Vector2[] Line23 = { v25, v22 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            Vector2[] Line24 = { new Vector2(v25.X - 2 * Math.Sin(epsr), v25.Y + 2 * Math.Cos(epsr)), new Vector2(v24.X + 2 * Math.Sin(epsr), v24.Y - 2 * Math.Cos(epsr)) };
            fun.drawPlinetype(dxf, Line24, 0.15, centre, Linetype.Center);
            Line line19 = new Line(v22, v12);
            //主视图图层
            line8.Layer = dimensioning;
            //俯视图图层
            line6.Layer = dimensioning;
            line7.Layer = dimensioning;
            //斜视图图层
            line19.Layer = dimensioning;
            //斜视图
            dxf.AddEntity(line19);
            //主视图
            dxf.AddEntity(line8);
            //俯视图
            dxf.AddEntity(line6);
            dxf.AddEntity(line7);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(v1, v6), -v6.X / 2 + offset, 270, dimensionStyle);
            dim2.UserText = "S";
            dxf.AddEntity(dim2);
            //尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(new Vector2(v14.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l), new Vector2(v14.X + 10 * Math.Sin(epsr), v6.Y - 20 - w1 / Math.Tan(epsr) - l - 10 * Math.Cos(epsr))), new Line(new Vector2(v14.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l), new Vector2(v14.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l - 10)), offset, dimensionStyle);
            angdim1.UserText = "EPSR";
            dxf.AddEntity(angdim1);
            //尺寸3
            RadialDimension dimrad4 = new RadialDimension(arc8, -epsr / pi * 180, offset / 2, dimensionStyle);//DimensionStyle.Default);
            dimrad4.UserText = "RE";
            dxf.AddEntity(dimrad4);
            //尺寸4
            LinearDimension dim4 = new LinearDimension(new Line(v15, new Vector2(v14.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l)), offset, 270, dimensionStyle);
            dim4.UserText = "LE";
            dxf.AddEntity(dim4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(new Vector2(v7.X, v6.Y - 20 - w1 / Math.Tan(epsr)), new Vector2(v7.X, v6.Y - 20 - w1 / Math.Tan(epsr) - l)), offset * 2, 270, dimensionStyle);
            dim5.UserText = "L";
            dxf.AddEntity(dim5);
            //尺寸6
            LinearDimension dim6 = new LinearDimension(new Line(v11, v14), -offset - w1 / Math.Tan(epsr) - re * Math.Sin(epsr), 0, dimensionStyle);
            dim6.UserText = "W1";
            dxf.AddEntity(dim6);
            //尺寸7
            LinearDimension dim7 = new LinearDimension(new Line(v3, v1), v3.Y / 2 + offset, 0, dimensionStyle);
            dim7.UserText = "LBB";
            dxf.AddEntity(dim7);
            //尺寸8
            Angular2LineDimension angdim8 = new Angular2LineDimension(new Line(v1, v6), line8, offset, dimensionStyle);
            angdim8.UserText = "AN";
            dxf.AddEntity(angdim8);
            //尺寸9
            Angular2LineDimension angdim9 = new Angular2LineDimension(new Line(v22, v23), new Line(v22, new Vector2(v22.X + s * Math.Sin(epsr), v22.Y - s * Math.Cos(epsr))), offset, dimensionStyle);
            angdim9.UserText = "ANN";
            dxf.AddEntity(angdim9);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE11(Dictionary<string, Object> data)//ISO 13399-2图片E.11
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double insd = 15;
            double an = 11 * pi / 180;
            double s = 4;
            double fhcsd = 6;
            double d1 = 5;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(insd / 2 + 20 + s, -insd / 2);
            Vector2 v3 = new Vector2(v2.X, 0);
            Vector2 v4 = new Vector2(v3.X - s, v3.Y);
            Vector2 v5 = new Vector2(v4.X, v2.Y + s * Math.Tan(an));
            //线段
            //主视图
            fun.drawcircle(dxf, v1, insd / 2, 0.3, contour);
            fun.drawcircle(dxf, v1, fhcsd / 2, 0.3, contour);
            fun.drawcircle(dxf, v1, d1 / 2, 0.3, contour);
            //侧视图
            Vector2[] Line1 = { v3, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v4, v5 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v5, v2 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Line line4 = new Line(new Vector2(0, -insd / 2), v2);
            Vector2[] Line6 = { new Vector2(v4.X - 2, 0), new Vector2(v3.X + 2, 0) };
            fun.drawPlinetype(dxf, Line6, 0.15, centre, Linetype.Center);
            Vector2[] Line7 = { new Vector2(0, insd / 2 + 2), new Vector2(0, -insd / 2 - 2) };
            fun.drawPlinetype(dxf, Line7, 0.15, centre, Linetype.Center);
            Vector2[] Line8 = { new Vector2(insd / 2 + 2, 0), new Vector2(-insd / 2 - 2, 0) };
            fun.drawPlinetype(dxf, Line8, 0.15, centre, Linetype.Center);
            //侧视图图层
            line4.Layer = dimensioning;
            //主视图
            dxf.AddEntity(line4);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(insd / 2, 0), new Vector2(-insd / 2, 0)), insd / 2 + offset, 0, dimensionStyle);
            dim2.UserText = "INSD";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(v3, v4), offset, 0, dimensionStyle);
            dim3.UserText = "S";
            dxf.AddEntity(dim3);
            //尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v2, v5), new Line(v2, new Vector2(v5.X, v2.Y)), offset, dimensionStyle);
            angdim1.UserText = "AN";
            dxf.AddEntity(angdim1);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE12(Dictionary<string, Object> data)//ISO 13399-2图片E.12
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double ic = 12.7;
            double pdy = 1.7;
            double pdx = 2;
            double epsr = 60 * pi / 180;
            double pna = 55 * pi / 180;
            double pal = 20 * pi / 180;
            double pdpt = 2.5;
            double par = pna - pal;
            double cre = 0.5;
            double l = ic * Math.Tan(epsr);
            double retr = 0.5;
            double lbb = 8;
            double fhcsd = 6;
            double d1 = 5;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(-ic / 2, l / 2);
            Vector2 v4 = new Vector2(l * Math.Sin(epsr) - ic / 2, 0);
            Vector2 v3 = new Vector2(v2.X, -l / 2);
            Vector2 v11 = new Vector2(v3.X + pdx + cre / Math.Sin(pna / 2) * Math.Sin(pna / 2 - pal), v3.Y + pdy + cre);
            Vector2 v6 = new Vector2(v11.X - cre * Math.Cos(pal), v11.Y - cre * Math.Sin(pal));
            Vector2 v7 = new Vector2(v11.X + cre * Math.Cos(par), v11.Y - cre * Math.Sin(par));
            Vector2 v5 = new Vector2(v2.X, v11.Y - cre / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal) + pdx / Math.Tan(pal));
            Vector2 v12 = new Vector2((cre / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal) + pdpt - cre) * Math.Tan(par) + v3.X + pdx, v3.Y + pdy + pdpt);
            Vector2 v9 = new Vector2(v12.X + retr * Math.Tan(pi / 4 - par / 2), v12.Y);
            Vector2 v8 = new Vector2(v9.X - retr * Math.Cos(par), v9.Y - retr + retr * Math.Sin(par));
            Vector2 v10 = new Vector2(v3.X + (pdy + pdpt) * Math.Tan(epsr), v3.Y + pdy + pdpt);
            Vector2 v13 = new Vector2(v2.X, v2.Y - (v10.X - v3.X) / Math.Sin(epsr));
            Vector2 v14 = new Vector2(v3.X, v3.Y + lbb / Math.Sin(epsr));
            Vector2 v15 = new Vector2(v3.X + lbb, v3.Y + lbb / Math.Tan(epsr));
            //局部图
            double scale = l / (v14.Y - v3.Y);
            Vector2 v16 = new Vector2(v3.X, v3.Y - 10);
            Vector2 v17 = new Vector2(v16.X, v16.Y - l);
            Vector2 v18 = new Vector2(l * Math.Sin(epsr) - ic / 2, v17.Y + l / 2);
            Vector2 v25 = new Vector2(v17.X + pdx * scale + cre * scale / Math.Sin(pna / 2) * Math.Sin(pna / 2 - pal), v17.Y + pdy * scale + cre * scale);
            Vector2 v20 = new Vector2(v25.X - cre * scale * Math.Cos(pal), v25.Y - cre * scale * Math.Sin(pal));
            Vector2 v21 = new Vector2(v25.X + cre * scale * Math.Cos(par), v25.Y - cre * scale * Math.Sin(par));
            Vector2 v19 = new Vector2(v16.X, v25.Y - cre * scale / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal) + pdx * scale / Math.Tan(pal));
            Vector2 v26 = new Vector2((cre * scale / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal) + pdpt * scale - cre * scale) * Math.Tan(par) + v17.X + pdx * scale, v17.Y + pdy * scale + pdpt * scale);
            Vector2 v23 = new Vector2(v26.X + retr * scale * Math.Tan(pi / 4 - par / 2), v26.Y);
            Vector2 v22 = new Vector2(v23.X - retr * scale * Math.Cos(par), v23.Y - retr * scale + retr * scale * Math.Sin(par));
            Vector2 v24 = new Vector2(v17.X + (pdy + pdpt) * scale * Math.Tan(epsr), v17.Y + pdy * scale + pdpt * scale);
            Vector2 v27 = new Vector2(v25.X - cre * scale / Math.Sin(pna / 2) * Math.Sin(pna / 2 - pal), v25.Y - cre * scale / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal));
            Vector2 v28 = new Vector2(v27.X + 10 * Math.Tan(pal), v27.Y - 10);
            Vector2 v29 = new Vector2(v27.X - 10 * Math.Tan(par), v27.Y - 10);
            //线段
            //主视图
            Circle circle1 = new Circle(v1, ic / 2);
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            dxf.AddEntity(circle1);
            LwPolyline tooth1 = new LwPolyline();
            tooth1.Vertexes.Add(new LwPolylineVertex(v13));
            tooth1.Vertexes.Add(new LwPolylineVertex(v5));
            tooth1.Vertexes.Add(new LwPolylineVertex(v6));
            tooth1.Vertexes.Add(new LwPolylineVertex(v7));
            tooth1.Vertexes[2].Bulge = Math.Tan((pi - pna) / 4);
            tooth1.Vertexes.Add(new LwPolylineVertex(v8));
            tooth1.Vertexes.Add(new LwPolylineVertex(v9));
            tooth1.Vertexes[4].Bulge = -Math.Tan((pi / 2 - par) / 4);
            tooth1.Vertexes.Add(new LwPolylineVertex(v10));
            fun.PolyFill(dxf, tooth1, 0.3, contour);
            var tooth2 = Pus.RotateByOrigin(2 * pi / 3, tooth1);
            fun.PolyFill(dxf, tooth2, 0.3, contour);
            var tooth3 = Pus.RotateByOrigin(2 * pi / 3, tooth2);
            fun.PolyFill(dxf, tooth3, 0.3, contour);
            LwPolyline flute1 = new LwPolyline();
            flute1.Vertexes.Add(new LwPolylineVertex(v14));
            flute1.Vertexes.Add(new LwPolylineVertex(v15));
            fun.PolyFill(dxf, flute1, 0.3, contour);
            var flute2 = Pus.RotateByOrigin(2 * pi / 3, flute1);
            fun.PolyFill(dxf, flute2, 0.3, contour);
            var flute3 = Pus.RotateByOrigin(2 * pi / 3, flute2);
            fun.PolyFill(dxf, flute3, 0.3, contour);
            fun.drawcircle(dxf, v1, d1 / 2, 0.3, contour);
            fun.drawcircle(dxf, v1, fhcsd / 2, 0.3, contour);
            Line line1 = new Line(v2, v3);
            line1.Layer = centre;
            line1.Linetype = Linetype.DashDot;
            dxf.AddEntity(line1);
            Line line2 = new Line(v3, v4);
            line2.Layer = centre;
            line2.Linetype = Linetype.DashDot;
            dxf.AddEntity(line2);
            Line line3 = new Line(v4, v2);
            line3.Layer = centre;
            line3.Linetype = Linetype.DashDot;
            dxf.AddEntity(line3);
            //局部图
            LwPolyline tooth4 = new LwPolyline();
            tooth4.Vertexes.Add(new LwPolylineVertex(v16));
            tooth4.Vertexes.Add(new LwPolylineVertex(v19));
            tooth4.Vertexes.Add(new LwPolylineVertex(v20));
            tooth4.Vertexes.Add(new LwPolylineVertex(v21));
            tooth4.Vertexes[2].Bulge = Math.Tan((pi - pna) / 4);
            tooth4.Vertexes.Add(new LwPolylineVertex(v22));
            tooth4.Vertexes.Add(new LwPolylineVertex(v23));
            tooth4.Vertexes[4].Bulge = -Math.Tan((pi / 2 - par) / 4);
            tooth4.Vertexes.Add(new LwPolylineVertex(v24));
            tooth4.Vertexes.Add(new LwPolylineVertex(v18));
            tooth4.IsClosed = true;
            fun.PolyFill(dxf, tooth4, 0.3, contour);
            Line line4 = new Line(v19, v17);
            line4.Layer = centre;
            line4.Linetype = Linetype.DashDot;
            dxf.AddEntity(line4);
            Line line5 = new Line(v17, v24);
            line5.Layer = centre;
            line5.Linetype = Linetype.DashDot;
            dxf.AddEntity(line5);
            Line line6 = new Line(v20, v28);
            line6.Layer = dimensioning;
            dxf.AddEntity(line6);
            Line line7 = new Line(v21, v29);
            line7.Layer = dimensioning;
            dxf.AddEntity(line7);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //主视图
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(v2, v3), -offset, 270, dimensionStyle);
            dim1.UserText = "L";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(0, -ic / 2), new Vector2(0, ic / 2)), v4.X + offset, 270, dimensionStyle);
            dim2.UserText = "IC";
            dxf.AddEntity(dim2);
            //局部图
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(v17, new Vector2(v25.X, v17.Y + pdy * scale)), -v25.X / 2 - offset, 270, dimensionStyle);
            dim3.UserText = "PDY";
            dxf.AddEntity(dim3);
            //尺寸4
            LinearDimension dim4 = new LinearDimension(new Line(v17, v27), -(v27.Y - v17.Y) / 2 - offset / 2, 0, dimensionStyle);
            dim4.UserText = "PDX";
            dxf.AddEntity(dim4);
            //尺寸6
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v27, v29), new Line(v27, v28), offset, dimensionStyle);
            angdim6.UserText = "PNA";
            dxf.AddEntity(angdim6);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE13(Dictionary<string, Object> data)//ISO 13399-2图片E.13
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double ic = 12.7;
            double pdy = 1;
            double pdx = 3;
            double epsr = 60 * pi / 180;
            double pna = 60 * pi / 180;
            double pal = 30 * pi / 180;
            double pdpt = 2.5;
            double par = pna - pal;
            double cre = 0.5;
            double l = ic * Math.Tan(epsr);
            double retr = 0.5;
            double lbb = 8;
            double fhcsd = 6;
            double d1 = 5;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(-ic / 2, l / 2);
            Vector2 v4 = new Vector2(l * Math.Sin(epsr) - ic / 2, 0);
            Vector2 v3 = new Vector2(v2.X, -l / 2);
            Vector2 v11 = new Vector2(v3.X + pdx + cre / Math.Sin(pna / 2) * Math.Sin(pna / 2 - pal), v3.Y + pdy + cre);
            Vector2 v6 = new Vector2(v11.X - cre * Math.Cos(pal), v11.Y - cre * Math.Sin(pal));
            Vector2 v7 = new Vector2(v11.X + cre * Math.Cos(par), v11.Y - cre * Math.Sin(par));
            Vector2 v5 = new Vector2(v2.X, v11.Y - cre / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal) + pdx / Math.Tan(pal));
            Vector2 v12 = new Vector2((cre / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal) + pdpt - cre) * Math.Tan(par) + v3.X + pdx, v3.Y + pdy + pdpt);
            Vector2 v9 = new Vector2(v12.X + retr * Math.Tan(pi / 4 - par / 2), v12.Y);
            Vector2 v8 = new Vector2(v9.X - retr * Math.Cos(par), v9.Y - retr + retr * Math.Sin(par));
            Vector2 v10 = new Vector2(v3.X + (pdy + pdpt) * Math.Tan(epsr), v3.Y + pdy + pdpt);
            Vector2 v13 = new Vector2(v2.X, v2.Y - (v10.X - v3.X) / Math.Sin(epsr));
            Vector2 v14 = new Vector2(v3.X, v3.Y + lbb / Math.Sin(epsr));
            Vector2 v15 = new Vector2(v3.X + lbb, v3.Y + lbb / Math.Tan(epsr));
            //局部图
            double scale = l / (v14.Y - v3.Y);
            Vector2 v16 = new Vector2(v3.X, v3.Y - 10);
            Vector2 v17 = new Vector2(v16.X, v16.Y - l);
            Vector2 v18 = new Vector2(l * Math.Sin(epsr) - ic / 2, v17.Y + l / 2);
            Vector2 v25 = new Vector2(v17.X + pdx * scale + cre * scale / Math.Sin(pna / 2) * Math.Sin(pna / 2 - pal), v17.Y + pdy * scale + cre * scale);
            Vector2 v20 = new Vector2(v25.X - cre * scale * Math.Cos(pal), v25.Y - cre * scale * Math.Sin(pal));
            Vector2 v21 = new Vector2(v25.X + cre * scale * Math.Cos(par), v25.Y - cre * scale * Math.Sin(par));
            Vector2 v19 = new Vector2(v16.X, v25.Y - cre * scale / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal) + pdx * scale / Math.Tan(pal));
            Vector2 v26 = new Vector2((cre * scale / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal) + pdpt * scale - cre * scale) * Math.Tan(par) + v17.X + pdx * scale, v17.Y + pdy * scale + pdpt * scale);
            Vector2 v23 = new Vector2(v26.X + retr * scale * Math.Tan(pi / 4 - par / 2), v26.Y);
            Vector2 v22 = new Vector2(v23.X - retr * scale * Math.Cos(par), v23.Y - retr * scale + retr * scale * Math.Sin(par));
            Vector2 v24 = new Vector2(v17.X + (pdy + pdpt) * scale * Math.Tan(epsr), v17.Y + pdy * scale + pdpt * scale);
            Vector2 v27 = new Vector2(v25.X - cre * scale / Math.Sin(pna / 2) * Math.Sin(pna / 2 - pal), v25.Y - cre * scale / Math.Sin(pna / 2) * Math.Cos(pna / 2 - pal));
            Vector2 v28 = new Vector2(v27.X + 10 * Math.Tan(pal), v27.Y - 10);
            Vector2 v29 = new Vector2(v27.X - 10 * Math.Tan(par), v27.Y - 10);
            //线段
            //主视图
            Circle circle1 = new Circle(v1, ic / 2);
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            dxf.AddEntity(circle1);
            LwPolyline tooth1 = new LwPolyline();
            tooth1.Vertexes.Add(new LwPolylineVertex(v13));
            tooth1.Vertexes.Add(new LwPolylineVertex(v5));
            tooth1.Vertexes.Add(new LwPolylineVertex(v6));
            tooth1.Vertexes.Add(new LwPolylineVertex(v7));
            tooth1.Vertexes[2].Bulge = Math.Tan((pi - pna) / 4);
            tooth1.Vertexes.Add(new LwPolylineVertex(v8));
            tooth1.Vertexes.Add(new LwPolylineVertex(v9));
            tooth1.Vertexes[4].Bulge = -Math.Tan((pi / 2 - par) / 4);
            tooth1.Vertexes.Add(new LwPolylineVertex(v10));
            fun.PolyFill(dxf, tooth1, 0.3, contour);
            var tooth2 = Pus.RotateByOrigin(2 * pi / 3, tooth1);
            fun.PolyFill(dxf, tooth2, 0.3, contour);
            var tooth3 = Pus.RotateByOrigin(2 * pi / 3, tooth2);
            fun.PolyFill(dxf, tooth3, 0.3, contour);
            LwPolyline flute1 = new LwPolyline();
            flute1.Vertexes.Add(new LwPolylineVertex(v14));
            flute1.Vertexes.Add(new LwPolylineVertex(v15));
            fun.PolyFill(dxf, flute1, 0.3, contour);
            var flute2 = Pus.RotateByOrigin(2 * pi / 3, flute1);
            fun.PolyFill(dxf, flute2, 0.3, contour);
            var flute3 = Pus.RotateByOrigin(2 * pi / 3, flute2);
            fun.PolyFill(dxf, flute3, 0.3, contour);
            fun.drawcircle(dxf, v1, d1 / 2, 0.3, contour);
            fun.drawcircle(dxf, v1, fhcsd / 2, 0.3, contour);
            Line line1 = new Line(v2, v3);
            line1.Layer = centre;
            line1.Linetype = Linetype.DashDot;
            dxf.AddEntity(line1);
            Line line2 = new Line(v3, v4);
            line2.Layer = centre;
            line2.Linetype = Linetype.DashDot;
            dxf.AddEntity(line2);
            Line line3 = new Line(v4, v2);
            line3.Layer = centre;
            line3.Linetype = Linetype.DashDot;
            dxf.AddEntity(line3);
            //局部图
            LwPolyline tooth4 = new LwPolyline();
            tooth4.Vertexes.Add(new LwPolylineVertex(v16));
            tooth4.Vertexes.Add(new LwPolylineVertex(v19));
            tooth4.Vertexes.Add(new LwPolylineVertex(v20));
            tooth4.Vertexes.Add(new LwPolylineVertex(v21));
            tooth4.Vertexes[2].Bulge = Math.Tan((pi - pna) / 4);
            tooth4.Vertexes.Add(new LwPolylineVertex(v22));
            tooth4.Vertexes.Add(new LwPolylineVertex(v23));
            tooth4.Vertexes[4].Bulge = -Math.Tan((pi / 2 - par) / 4);
            tooth4.Vertexes.Add(new LwPolylineVertex(v24));
            tooth4.Vertexes.Add(new LwPolylineVertex(v18));
            //tooth4.IsClosed = true;
            fun.PolyFill(dxf, tooth4, 0.3, contour);
            Line line4 = new Line(v19, v17);
            line4.Layer = centre;
            line4.Linetype = Linetype.DashDot;
            dxf.AddEntity(line4);
            Line line5 = new Line(v17, v24);
            line5.Layer = centre;
            line5.Linetype = Linetype.DashDot;
            dxf.AddEntity(line5);
            Line line6 = new Line(v20, v28);
            line6.Layer = dimensioning;
            dxf.AddEntity(line6);
            Line line7 = new Line(v21, v29);
            line7.Layer = dimensioning;
            dxf.AddEntity(line7);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //主视图
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v11.X, v3.Y + pdy), new Vector2(v3.X, v2.Y - (v5.Y - v3.Y) * Math.Sin(pal))), -(v11.X - v3.X) / 2 - offset, 270, dimensionStyle);
            dim1.UserText = "INSL";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(0, -ic / 2), new Vector2(0, ic / 2)), v4.X + offset, 270, dimensionStyle);
            dim2.UserText = "IC";
            dxf.AddEntity(dim2);
            //局部图
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(v17, new Vector2(v25.X, v17.Y + pdy * scale)), -v25.X / 2 - offset, 270, dimensionStyle);
            dim3.UserText = "PDY";
            dxf.AddEntity(dim3);
            //尺寸4
            LinearDimension dim4 = new LinearDimension(new Line(v17, v27), -(v27.Y - v17.Y) / 2 - offset / 2, 0, dimensionStyle);
            dim4.UserText = "PDX";
            dxf.AddEntity(dim4);
            //尺寸6
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v27, v29), new Line(v27, v28), offset, dimensionStyle);
            angdim6.UserText = "PNA";
            dxf.AddEntity(angdim6);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE14(Dictionary<string, Object> data)//ISO 13399-2 图片E.14
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 80;
            double tp = 7;
            double pi = Math.PI;
            double pna = 60 * pi / 180;
            double nft = 2;
            double kn = 0.18;
            double fn = 0.14;
            double ff = 0.12;
            double w1 = 50;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + nft, v1.Y + nft * Math.Tan((pi / 2 - pna) / 2));
            Vector2 v3 = new Vector2(v2.X + nft, v2.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 4);
            Vector2 v4 = new Vector2(v3.X + nft / 20, v3.Y + nft / 4 / Math.Tan(pi / 2 - pna));
            Vector2 v5 = new Vector2(v4.X + nft / 4, v4.Y + Math.Tan(pi / 2 - pna) * nft / 4);
            Vector2 v6 = new Vector2(v5.X + Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2), v5.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 2);
            Vector2 v7 = new Vector2(v6.X + Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4, v6.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v8 = new Vector2(v7.X + Math.Tan((pi / 2 - pna) / 2 * Math.Tan((pi / 2 - pna) / 2) * nft) * 2, v7.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v9 = new Vector2(v8.X + (Math.Tan(pi / 2 - pna) / nft / Math.Tan(pi / 2 - pna)) * 4, v8.Y);
            Vector2 v10 = new Vector2(v9.X + Math.Tan((pi / 2 - pna) / 2 * Math.Tan((pi / 2 - pna) / 2) * nft) * 9, v9.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 4);
            Vector2 v11 = new Vector2(v10.X + nft / 4, v10.Y + Math.Tan(pi / 2 - pna) * nft / 4);
            Vector2 v12 = new Vector2(v11.X + Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 2, v11.Y + Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v13 = new Vector2(v12.X + Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4, v12.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v14 = new Vector2(v13.X + (v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2), v9.Y);
            Vector2 v15 = new Vector2(v14.X + tp / 2, v14.Y);
            Vector2 v16 = new Vector2(v15.X + (v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2) + kn, v13.Y + ((v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) / Math.Tan(pna / 2));
            Vector2 v17 = new Vector2(v16.X + tp / 2, v16.Y);
            Vector2 v18 = new Vector2(v17.X + (v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2) + kn, v17.Y - v9.Y);
            Vector2 v19 = new Vector2(v18.X + tp / 2, v18.Y - ((v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2)));
            Vector2 v20 = new Vector2(v19.X + ff, v19.Y + ((v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2)) / 4);
            Vector2 v21 = new Vector2(v20.X + tp / 3 + fn, v20.Y + (v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2) + kn);
            Vector2 v22 = new Vector2(v21.X + (((v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) * 4) / Math.Tan(pna / 2), v21.Y - ((v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) * 2);
            Vector2 v23 = new Vector2(0, v1.Y - 1);
            Vector2 v24 = new Vector2(v23.X + l / 2 - 1 - 1, v23.Y + (Math.Tan(pna / 16) * l / 2));
            Vector2 v25 = new Vector2(0, v1.Y - 6);
            Vector2 v26 = new Vector2(v25.X + l / 2 - 1 - 1, v25.Y + (Math.Tan(pna / 16) * l / 2));
            Vector2 v27 = new Vector2(0, v1.Y - 8);
            Vector2 v28 = new Vector2(v27.X + l / 2 - 1.5 - 1, v27.Y + (Math.Tan(pna / 12) * l / 2));
            Vector2 v29 = new Vector2(v24.X + 1, v24.Y + Math.Tan(pna / 12) * 3);
            Vector2 v30 = new Vector2(v26.X + 1, v26.Y + Math.Tan(pna / 12) * 3);
            Vector2 v31 = new Vector2(v28.X + 1, v28.Y + Math.Tan(pna / 12) * 3);
            Vector2 v32 = new Vector2(v24.X - 4, v24.Y - ff * 4);
            Vector2 v33 = new Vector2(v26.X - 3, v26.Y - ff);
            Vector2 v34 = new Vector2(v28.X - 2.28, v28.Y - ff);
            Vector2 v35 = new Vector2(v1.X, v1.Y - 10);
            //主视图2
            Vector2 v36 = new Vector2(v1.X, v1.Y - 30);
            Vector2 v37 = new Vector2(v36.X, v36.Y - 8);
            Vector2 v38 = new Vector2(v36.X, v36.Y - w1 + 8);
            Vector2 v39 = new Vector2(v38.X + l, v38.Y);
            Vector2 v40 = new Vector2(v39.X, v37.Y);
            Vector2 v41 = new Vector2(v40.X - l / 2, v40.Y + Math.Tan(pna / 2) * l / 22);
            Vector2 v42 = new Vector2(v40.X - nft, v40.Y + nft * Math.Tan((pi / 2 - pna) / 2));
            Vector2 v43 = new Vector2(v42.X - nft, v42.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 4);
            Vector2 v44 = new Vector2(v43.X - nft / 20, v43.Y + nft / 4 / Math.Tan(pi / 2 - pna));
            Vector2 v45 = new Vector2(v44.X - nft / 4, v44.Y + Math.Tan(pi / 2 - pna) * nft / 4);
            Vector2 v46 = new Vector2(v45.X - Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2), v45.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 2);
            Vector2 v47 = new Vector2(v46.X - Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4, v46.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v48 = new Vector2(v47.X - Math.Tan((pi / 2 - pna) / 2 * Math.Tan((pi / 2 - pna) / 2) * nft) * 2, v47.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v49 = new Vector2(v48.X - (Math.Tan(pi / 2 - pna) / nft / Math.Tan(pi / 2 - pna)) * 4, v48.Y);
            Vector2 v50 = new Vector2(v49.X - Math.Tan((pi / 2 - pna) / 2 * Math.Tan((pi / 2 - pna) / 2) * nft) * 9, v49.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 4);
            Vector2 v51 = new Vector2(v50.X - nft / 4, v50.Y + Math.Tan(pi / 2 - pna) * nft / 4);
            Vector2 v52 = new Vector2(v51.X - Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 2, v51.Y + Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v53 = new Vector2(v52.X - Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4, v52.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v54 = new Vector2(v53.X - (v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2), v49.Y);
            Vector2 v55 = new Vector2(v54.X - tp / 2, v54.Y);
            Vector2 v56 = new Vector2(v55.X - (v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2) - kn, v53.Y + ((v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) / Math.Tan(pna / 2));
            Vector2 v57 = new Vector2(v56.X - tp / 2, v56.Y);
            Vector2 v58 = new Vector2(v57.X - (v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2) - kn, v54.Y + kn);
            Vector2 v59 = new Vector2(v58.X - tp / 2, v58.Y - ((v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2)));
            Vector2 v60 = new Vector2(v59.X - ff, v59.Y + ((v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2)) / 4);
            Vector2 v61 = new Vector2(v60.X - tp / 3 + fn, v60.Y + (v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2) + kn);
            Vector2 v62 = new Vector2(v61.X - (((v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) * 6) / Math.Tan(pna / 2), v61.Y - ((v53.Y - v49.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) * 2);
            Vector2 v63 = new Vector2(v37.X + l / 2 - nft * 5, v37.Y + Math.Tan(pna / 2) * l / 22 - nft / 6);
            Vector2 v64 = new Vector2(v37.X + nft, v37.Y + nft * Math.Tan((pi / 2 - pna) / 2));
            Vector2 v65 = new Vector2(v64.X + nft, v64.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 4);
            Vector2 v66 = new Vector2(v65.X + nft / 20, v65.Y + nft / 4 / Math.Tan(pi / 2 - pna));
            Vector2 v67 = new Vector2(v66.X + nft / 4, v66.Y + Math.Tan(pi / 2 - pna) * nft / 4);
            Vector2 v68 = new Vector2(v67.X + Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2), v67.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 2);
            Vector2 v69 = new Vector2(v68.X + Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4, v68.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v70 = new Vector2(v69.X + Math.Tan((pi / 2 - pna) / 2 * Math.Tan((pi / 2 - pna) / 2) * nft) * 2, v69.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v71 = new Vector2(v70.X + (Math.Tan(pi / 2 - pna) / nft / Math.Tan(pi / 2 - pna)) * 4, v70.Y);
            Vector2 v72 = new Vector2(v71.X + Math.Tan((pi / 2 - pna) / 2 * Math.Tan((pi / 2 - pna) / 2) * nft) * 9, v71.Y + Math.Tan(pi / 2 - pna) / 2 * nft * 4);
            Vector2 v73 = new Vector2(v72.X + nft / 4, v72.Y + Math.Tan(pi / 2 - pna) * nft / 4);
            Vector2 v74 = new Vector2(v73.X + Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 2, v73.Y + Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v75 = new Vector2(v74.X + Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4, v74.Y - Math.Tan(pi / 2 - pna) / 2 * nft);
            Vector2 v76 = new Vector2(v75.X + (v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2), v71.Y);
            Vector2 v77 = new Vector2(v76.X + tp / 2, v76.Y);
            Vector2 v78 = new Vector2(v77.X + (v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2) - kn, v75.Y + ((v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) / Math.Tan(pna / 2));
            Vector2 v79 = new Vector2(v78.X + tp / 2, v78.Y);
            Vector2 v80 = new Vector2(v79.X + (v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2) - kn, v76.Y + kn);
            Vector2 v81 = new Vector2(v80.X + tp / 2, v80.Y - ((v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2)));
            Vector2 v82 = new Vector2(v81.X + ff, v81.Y + ((v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2)) / 4);
            Vector2 v83 = new Vector2(v82.X + tp / 3 + fn, v82.Y + (v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2) + kn);
            Vector2 v84 = new Vector2(v83.X + (((v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) * 3) / Math.Tan(pna / 2), v83.Y - ((v75.Y - v71.Y) * Math.Tan((pi / 2 - pna) / 2) + kn) * 2);
            Vector2 v85 = new Vector2(v63.X + nft * 3, v63.Y + nft - kn * 5);
            Vector2 v86 = new Vector2(v36.X, v37.Y - 4);
            Vector2 v87 = new Vector2(v86.X + l / 2 - 8, v86.Y + (Math.Tan(pna / 14) * l / 2));
            Vector2 v88 = new Vector2(v86.X, v86.Y - 1.4);
            Vector2 v89 = new Vector2(v88.X + l / 2 - 8.5, v88.Y + (Math.Tan(pna / 11) * l / 2));
            Vector2 v90 = new Vector2(v63.X + ff, v63.Y + Math.Tan(pi / 2 - pna) * ff / 4);
            Vector2 v91 = new Vector2(v90.X + ff, v87.Y - ff * 4);
            Vector2 v92 = new Vector2(v38.X + nft * 8, v38.Y + nft * 8);
            Vector2 v93 = new Vector2(v39.X - nft * 8, v39.Y + nft * 8);
            // 线段
            //局部图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes[0].Bulge = -(nft / 2 + Math.Tan(pi / 2 - pna) / 2 * nft / 2) * Math.Sin((pi / 2 - pna) / 2);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line2 = { v3, v4 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v4));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (nft / 5 + (Math.Tan(pi / 2 - pna) * nft / 5));
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v6));
            Arc3.Vertexes.Add(new LwPolylineVertex(v7));
            Arc3.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc3, 0.3, contour);
            Vector2[] Line4 = { v7, v8 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v8));
            Arc4.Vertexes.Add(new LwPolylineVertex(v9));
            Arc4.Vertexes[0].Bulge = (Math.Tan(pi / 2 - pna) / nft) * 2;
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Vector2[] Line5 = { v9, v10 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v10));
            Arc5.Vertexes.Add(new LwPolylineVertex(v11));
            Arc5.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (nft / 5 + (Math.Tan(pi / 2 - pna) * nft / 5));
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            Vector2[] Line6 = { v11, v12 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v12));
            Arc6.Vertexes.Add(new LwPolylineVertex(v13));
            Arc6.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            Vector2[] Line7 = { v13, v14 };
            fun.drawBLine(dxf, Line7, 0.3, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v14));
            Arc7.Vertexes.Add(new LwPolylineVertex(v15));
            Arc7.Vertexes[0].Bulge = (Math.Tan(pi / 2 - pna) / nft) * 3;
            fun.PolyFill(dxf, Arc7, 0.3, contour);
            Vector2[] Line8 = { v15, v16 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v16));
            Arc8.Vertexes.Add(new LwPolylineVertex(v17));
            Arc8.Vertexes[0].Bulge = -(Math.Tan(pi / 2 - pna) / nft) * 3;
            fun.PolyFill(dxf, Arc8, 0.3, contour);
            Vector2[] Line9 = { v17, v18 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v18));
            Arc9.Vertexes.Add(new LwPolylineVertex(v19));
            Arc9.Vertexes[0].Bulge = ((v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2));
            fun.PolyFill(dxf, Arc9, 0.3, contour);
            Vector2[] Line10 = { v19, v20 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v20));
            Arc10.Vertexes.Add(new LwPolylineVertex(v21));
            Arc10.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc10, 0.3, contour);
            Vector2[] Line11 = { v21, v22 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v23, v24 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v25, v26 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v27, v28 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            Vector2[] Line15 = { v24, v29 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v26, v30 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            Vector2[] Line17 = { v28, v31 };
            fun.drawBLine(dxf, Line17, 0.3, contour);
            Vector2[] Line18 = { v32, v33 };
            fun.drawBLine(dxf, Line18, 0.3, contour);
            Vector2[] Line19 = { v33, v34 };
            fun.drawBLine(dxf, Line19, 0.3, contour);
            Vector2[] Line20 = { v1, v35 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            //局部图2
            Vector2[] Line21 = { v37, v38 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            Vector2[] Line22 = { v38, v39 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            Vector2[] Line23 = { v39, v40 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            Vector2[] Line24 = { v40, v41 };
            fun.drawBLine(dxf, Line24, 0.3, contour);
            Vector2[] Line25 = { v40, v42 };
            fun.drawBLine(dxf, Line25, 0.3, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v42));
            Arc11.Vertexes.Add(new LwPolylineVertex(v43));
            Arc11.Vertexes[0].Bulge = -(nft / 2 + Math.Tan(pi / 2 - pna) / 2 * nft / 2) * Math.Sin((pi / 2 - pna) / 2);
            fun.PolyFill(dxf, Arc11, 0.3, contour);
            Vector2[] Line26 = { v43, v44 };
            fun.drawBLine(dxf, Line26, 0.3, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v44));
            Arc12.Vertexes.Add(new LwPolylineVertex(v45));
            Arc12.Vertexes[0].Bulge = Math.Tan((pi / 2 - pna) / 2) * (nft / 5 + (Math.Tan(pi / 2 - pna) * nft / 5));
            fun.PolyFill(dxf, Arc12, 0.3, contour);
            Vector2[] Line27 = { v45, v46 };
            fun.drawBLine(dxf, Line27, 0.3, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v46));
            Arc13.Vertexes.Add(new LwPolylineVertex(v47));
            Arc13.Vertexes[0].Bulge = Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc13, 0.3, contour);
            Vector2[] Line28 = { v47, v48 };
            fun.drawBLine(dxf, Line28, 0.3, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v48));
            Arc14.Vertexes.Add(new LwPolylineVertex(v49));
            Arc14.Vertexes[0].Bulge = -(Math.Tan(pi / 2 - pna) / nft) * 2;
            fun.PolyFill(dxf, Arc14, 0.3, contour);
            Vector2[] Line29 = { v49, v50 };
            fun.drawBLine(dxf, Line29, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v50));
            Arc15.Vertexes.Add(new LwPolylineVertex(v51));
            Arc15.Vertexes[0].Bulge = Math.Tan((pi / 2 - pna) / 2) * (nft / 5 + (Math.Tan(pi / 2 - pna) * nft / 5));
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            Vector2[] Line30 = { v51, v52 };
            fun.drawBLine(dxf, Line30, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v52));
            Arc16.Vertexes.Add(new LwPolylineVertex(v53));
            Arc16.Vertexes[0].Bulge = Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            Vector2[] Line31 = { v53, v54 };
            fun.drawBLine(dxf, Line31, 0.3, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v54));
            Arc17.Vertexes.Add(new LwPolylineVertex(v55));
            Arc17.Vertexes[0].Bulge = -(Math.Tan(pi / 2 - pna) / nft) * 3;
            fun.PolyFill(dxf, Arc17, 0.3, contour);
            Vector2[] Line32 = { v55, v56 };
            fun.drawBLine(dxf, Line32, 0.3, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v56));
            Arc18.Vertexes.Add(new LwPolylineVertex(v57));
            Arc18.Vertexes[0].Bulge = (Math.Tan(pi / 2 - pna) / nft) * 3;
            fun.PolyFill(dxf, Arc18, 0.3, contour);
            Vector2[] Line33 = { v57, v58 };
            fun.drawBLine(dxf, Line33, 0.3, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v58));
            Arc19.Vertexes.Add(new LwPolylineVertex(v59));
            Arc19.Vertexes[0].Bulge = -((v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2));
            fun.PolyFill(dxf, Arc19, 0.3, contour);
            Vector2[] Line34 = { v59, v60 };
            fun.drawBLine(dxf, Line34, 0.3, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v60));
            Arc20.Vertexes.Add(new LwPolylineVertex(v61));
            Arc20.Vertexes[0].Bulge = Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc20, 0.3, contour);
            Vector2[] Line35 = { v61, v62 };
            fun.drawBLine(dxf, Line35, 0.3, contour);
            Vector2[] Line36 = { v41, v62 };
            fun.drawBLine(dxf, Line36, 0.3, contour);
            Vector2[] Line37 = { v37, v63 };
            fun.drawBLine(dxf, Line37, 0.3, contour);
            Vector2[] Line38 = { v37, v64 };
            fun.drawBLine(dxf, Line38, 0.3, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v64));
            Arc21.Vertexes.Add(new LwPolylineVertex(v65));
            Arc21.Vertexes[0].Bulge = (nft / 2 + Math.Tan(pi / 2 - pna) / 2 * nft / 2) * Math.Sin((pi / 2 - pna) / 2);
            fun.PolyFill(dxf, Arc21, 0.3, contour);
            Vector2[] Line39 = { v65, v66 };
            fun.drawBLine(dxf, Line39, 0.3, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v66));
            Arc22.Vertexes.Add(new LwPolylineVertex(v67));
            Arc22.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (nft / 5 + (Math.Tan(pi / 2 - pna) * nft / 5));
            fun.PolyFill(dxf, Arc22, 0.3, contour);
            Vector2[] Line40 = { v67, v68 };
            fun.drawBLine(dxf, Line40, 0.3, contour);
            LwPolyline Arc23 = new LwPolyline();
            Arc23.Vertexes.Add(new LwPolylineVertex(v68));
            Arc23.Vertexes.Add(new LwPolylineVertex(v69));
            Arc23.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc23, 0.3, contour);
            Vector2[] Line41 = { v69, v70 };
            fun.drawBLine(dxf, Line41, 0.3, contour);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v70));
            Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            Arc24.Vertexes[0].Bulge = (Math.Tan(pi / 2 - pna) / nft) * 2;
            fun.PolyFill(dxf, Arc24, 0.3, contour);
            Vector2[] Line42 = { v71, v72 };
            fun.drawBLine(dxf, Line42, 0.3, contour);
            LwPolyline Arc25 = new LwPolyline();
            Arc25.Vertexes.Add(new LwPolylineVertex(v72));
            Arc25.Vertexes.Add(new LwPolylineVertex(v73));
            Arc25.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (nft / 5 + (Math.Tan(pi / 2 - pna) * nft / 5));
            fun.PolyFill(dxf, Arc25, 0.3, contour);
            Vector2[] Line43 = { v73, v74 };
            fun.drawBLine(dxf, Line43, 0.3, contour);
            LwPolyline Arc26 = new LwPolyline();
            Arc26.Vertexes.Add(new LwPolylineVertex(v74));
            Arc26.Vertexes.Add(new LwPolylineVertex(v75));
            Arc26.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc26, 0.3, contour);
            Vector2[] Line44 = { v75, v76 };
            fun.drawBLine(dxf, Line44, 0.3, contour);
            LwPolyline Arc27 = new LwPolyline();
            Arc27.Vertexes.Add(new LwPolylineVertex(v76));
            Arc27.Vertexes.Add(new LwPolylineVertex(v77));
            Arc27.Vertexes[0].Bulge = (Math.Tan(pi / 2 - pna) / nft) * 3;
            fun.PolyFill(dxf, Arc27, 0.3, contour);
            Vector2[] Line45 = { v77, v78 };
            fun.drawBLine(dxf, Line45, 0.3, contour);
            LwPolyline Arc28 = new LwPolyline();
            Arc28.Vertexes.Add(new LwPolylineVertex(v78));
            Arc28.Vertexes.Add(new LwPolylineVertex(v79));
            Arc28.Vertexes[0].Bulge = -(Math.Tan(pi / 2 - pna) / nft) * 3;
            fun.PolyFill(dxf, Arc28, 0.3, contour);
            Vector2[] Line46 = { v79, v80 };
            fun.drawBLine(dxf, Line46, 0.3, contour);
            LwPolyline Arc29 = new LwPolyline();
            Arc29.Vertexes.Add(new LwPolylineVertex(v80));
            Arc29.Vertexes.Add(new LwPolylineVertex(v81));
            Arc29.Vertexes[0].Bulge = ((v13.Y - v9.Y) * Math.Tan((pi / 2 - pna) / 2));
            fun.PolyFill(dxf, Arc29, 0.3, contour);
            Vector2[] Line47 = { v81, v82 };
            fun.drawBLine(dxf, Line47, 0.3, contour);
            LwPolyline Arc30 = new LwPolyline();
            Arc30.Vertexes.Add(new LwPolylineVertex(v82));
            Arc30.Vertexes.Add(new LwPolylineVertex(v83));
            Arc30.Vertexes[0].Bulge = -Math.Tan((pi / 2 - pna) / 2) * (Math.Tan(pi / 2 - pna) / 2 * nft * 2 / Math.Tan((pi / 2 - pna) / 2) / 4 + Math.Tan(pi / 2 - pna) / 2 * nft / 2);
            fun.PolyFill(dxf, Arc30, 0.3, contour);
            Vector2[] Line48 = { v83, v84 };
            fun.drawBLine(dxf, Line48, 0.3, contour);
            Vector2[] Line49 = { v62, v84 };
            fun.drawBLine(dxf, Line49, 0.3, contour);
            Vector2[] Line50 = { v63, v85 };
            fun.drawBLine(dxf, Line50, 0.3, contour);
            Vector2[] Line51 = { v86, v87 };
            fun.drawBLine(dxf, Line51, 0.3, contour);
            Vector2[] Line52 = { v88, v89 };
            fun.drawBLine(dxf, Line52, 0.3, contour);
            LwPolyline Arc31 = new LwPolyline();
            Arc31.Vertexes.Add(new LwPolylineVertex(v41));
            Arc31.Vertexes.Add(new LwPolylineVertex(v87));
            Arc31.Vertexes[0].Bulge = -4 * Math.Tan(pi / 2 - pna) * 1 / 18;
            fun.PolyFill(dxf, Arc31, 0.3, contour);
            LwPolyline Arc32 = new LwPolyline();
            Arc32.Vertexes.Add(new LwPolylineVertex(v41));
            Arc32.Vertexes.Add(new LwPolylineVertex(v89));
            Arc32.Vertexes[0].Bulge = -4 * Math.Tan(pi / 2 - pna) * 1 / 15;
            fun.PolyFill(dxf, Arc32, 0.3, contour);
            Vector2[] Line53 = { v90, v91 };
            fun.drawBLine(dxf, Line53, 0.3, contour);
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v92, 0, 11)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v92, Math.PI, 11)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v92, 0, 11)));
            fun.PolyFill(dxf, poly, 0.3, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v92, 0, nft * 4)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v92, Math.PI, nft * 4)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v92, 0, nft * 4)));
            fun.PolyFill(dxf, poly1, 0.3, contour);
            LwPolyline poly2 = new LwPolyline();
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v93, 0, 11)));
            poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v93, Math.PI, 11)));
            poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v93, 0, 11)));
            fun.PolyFill(dxf, poly2, 0.3, contour);
            LwPolyline poly3 = new LwPolyline();
            poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v93, 0, nft * 4)));
            poly3.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v93, Math.PI, nft * 4)));
            poly3.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v93, 0, nft * 4)));
            fun.PolyFill(dxf, poly3, 0.3, contour);
            //标注
            //文本样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.0;
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE15(Dictionary<string, Object> data)//ISO 13399-2 图片E.15
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double s1 = 8;
            double s = 6.6;
            double l = 22;
            double tp = 7.5;
            double f = 5;
            double pi = Math.PI;
            double pna = 54 * pi / 180;
            double m1 = 4.4;
            double O = 10;
            string path = Convert.ToString(data["path"]);
            //局部图1
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + s1 - (s1 - s) / 2, 0);
            Vector2 v3 = new Vector2(v1.X, v2.Y - s / 4);
            Vector2 v4 = new Vector2(v2.X - (s1 - s) / 6, v2.Y - s / 4);
            Vector2 v5 = new Vector2(v1.X, v2.Y - (s / 4) * 2);
            Vector2 v6 = new Vector2(v4.X, v2.Y - (s / 4) * 2);
            Vector2 v7 = new Vector2(v2.X, v2.Y - (s / 4) * 2 / 3);
            Vector2 v8 = new Vector2(v4.X + 0.2, v4.Y - (s / 4) / 2);
            Vector2 v9 = new Vector2(v1.X, v5.Y - (s / 4) / 2);
            Vector2 v10 = new Vector2(v6.X, v9.Y);
            Vector2 v11 = new Vector2(v1.X, v9.Y - l);
            Vector2 v12 = new Vector2(v1.X, v9.Y - l + (s / 4));
            Vector2 v13 = new Vector2(v2.X, v11.Y);
            Vector2 v14 = new Vector2(v2.X - 0.2, v12.Y);
            Vector2 v15 = new Vector2(v14.X - 0.05, v12.Y + s / 4);
            Vector2 v16 = new Vector2(v15.X + 0.05 + 0.2 + (s1 - s) - (s1 - s) / 4 - (s1 - s) / 4, v12.Y + (s / 4) * 2);
            Vector2 v17 = new Vector2(v10.X, v10.Y - s / 4);
            Vector2 v18 = new Vector2(v16.X, v17.Y - s / 4);
            //局部图2
            Vector2 v19 = new Vector2(v18.X - 10, v18.Y - 30);
            Vector2 v20 = new Vector2(v19.X + l, v19.Y);
            Vector2 v21 = new Vector2(v19.X, v19.Y - s / 2);
            Vector2 v22 = new Vector2(v21.X + f / 2, v21.Y - (f / 2) / Math.Tan(pna / 2));
            Vector2 v23 = new Vector2(v22.X + (tp - f) / 2, v22.Y);
            Vector2 v24 = new Vector2(v23.X + f / 3, v23.Y + (f / 3) / Math.Tan(pna / 2));
            Vector2 v25 = new Vector2(v24.X + (s - f) + (s - f) / 2, v24.Y);
            Vector2 v26 = new Vector2(v25.X + f / 2, v24.Y - (f / 2) / Math.Tan(pna / 2));
            Vector2 v27 = new Vector2(v26.X + (s - f) + (s - f) / 4, v26.Y);
            Vector2 v28 = new Vector2(v27.X + f / 3, v27.Y + (f / 2.5) / Math.Tan(pna / 2));
            Vector2 v29 = new Vector2(v28.X + f / 3, v28.Y);
            Vector2 v30 = new Vector2(v29.X + f / 20, v29.Y - f / 13);
            Vector2 v31 = new Vector2(v30.X + f / 6, v30.Y - f / 10);
            Vector2 v32 = new Vector2(v31.X + f / 3, v31.Y);
            //主视图
            Vector2 v33 = new Vector2(v1.X - 60, v1.Y);
            Vector2 v34 = new Vector2(v33.X - f, v33.Y + Math.Tan(pna) * f / 2);
            Vector2 v35 = new Vector2(v34.X - f / 2, v34.Y);
            Vector2 v36 = new Vector2(v35.X - f / 7, v35.Y - (tp - f) / 2);
            Vector2 v37 = new Vector2(v35.X + f / 6, v35.Y - (f / 3) / Math.Tan(pna / 2));
            Vector2 v38 = new Vector2(v37.X - f / 4, v37.Y - ((s - f) / 3) * 4);
            Vector2 v39 = new Vector2(v38.X - f / 2, v38.Y);
            Vector2 v40 = new Vector2(v39.X - f / 7, v39.Y - (tp - f) / 2);
            Vector2 v41 = new Vector2(v39.X + f / 6, v39.Y - (f / 3) / Math.Tan(pna / 2));
            Vector2 v42 = new Vector2(v41.X - f / 6 - f / 7 - ((tp - f) / 4) / Math.Tan(pna), v41.Y - f / 6);
            Vector2 v43 = new Vector2(v42.X, v42.Y - f / 2);
            Vector2 v44 = new Vector2(v33.X + f, v33.Y - Math.Tan(pna) * s / 3);
            Vector2 v45 = new Vector2(v44.X + f * 2, v44.Y - Math.Tan(pna) * m1);
            Vector2 v46 = new Vector2(v45.X + f / 3, v45.Y - f / 5);
            Vector2 v47 = new Vector2(v46.X, v46.Y - f / 6);
            Vector2 v48 = new Vector2(v47.X + f / 20, v47.Y - f / 13);
            Vector2 v49 = new Vector2(v48.X + f / 3, v48.Y);
            Vector2 v50 = new Vector2(v49.X + f / 8, v49.Y - (f / 2.5) / Math.Tan(pna));
            Vector2 v51 = new Vector2(v50.X - (s - f), v50.Y - (s - f));
            Vector2 v52 = new Vector2(v51.X + ((s - f) / 2), v51.Y - (f / 2) / Math.Tan(pna));
            Vector2 v53 = new Vector2(v52.X + (s - f) + (s - f) / 2, v52.Y);
            Vector2 v54 = new Vector2(v53.X + f / 6, v53.Y - (f / 2) / Math.Tan(pna));
            Vector2 v55 = new Vector2(v54.X - (s - f), v54.Y - (s - f));
            Vector2 v56 = new Vector2(v55.X - f * 2, v55.Y - Math.Tan(pna) * m1 / 2);
            Vector2 v57 = new Vector2(v33.X, v56.Y - Math.Tan(pna) * s / 3);
            Vector2 v58 = new Vector2(v56.X - f, v56.Y - Math.Tan(pna) * s / 6);
            Vector2 v59 = new Vector2(v43.X, v43.Y - Math.Tan(pna) * s * 3 / 2);
            Vector2 v60 = new Vector2(v57.X - f / 3, v57.Y + (f / 6) / Math.Tan(pna));
            Vector2 v61 = new Vector2(v60.X - f / 10, v60.Y + f / 10);
            Vector2 v62 = new Vector2(v61.X - f / 8, v61.Y);
            Vector2 v63 = new Vector2(v62.X - f / 3, v62.Y - (tp - f));
            Vector2 v64 = new Vector2(v63.X - f / 3, v63.Y);
            Vector2 v65 = new Vector2(v64.X - f / 4, v64.Y + ((s - f) / 3) * 4);
            Vector2 v66 = new Vector2(v65.X - f / 3, v65.Y);
            Vector2 v67 = new Vector2(v66.X - f / 6, v66.Y - (tp - f) * 4 / 5);
            Vector2 v68 = new Vector2(v67.X - f / 3, v67.Y);
            Vector2 v69 = new Vector2(v41.X - f / 8, v41.Y - f / 8);
            Vector2 v70 = new Vector2(v69.X + 0.1, v69.Y - 0.1 / 6);
            Vector2 v71 = new Vector2(v70.X - f / 6 - f / 7 - ((tp - f) / 4) / Math.Tan(pna), v70.Y - f / 6);
            Vector2 v72 = new Vector2(v68.X - f / 8, v68.Y + Math.Tan(pna) * f / 3);
            Vector2 v73 = new Vector2(v71.X, v71.Y - f * 3);
            Vector2 v74 = new Vector2(v71.X, v71.Y - f / 2);
            Vector2 v75 = new Vector2(v46.X - f / 2, v46.Y + f / 4);
            Vector2 v76 = new Vector2(v56.X + f * 3 / 2, v56.Y + f / 2);
            Vector2 v77 = new Vector2(v46.X - f * 3, v46.Y - f * 3 / 5);
            Vector2 v78 = new Vector2(v45.X + f * 3, v45.Y - f - f / 2 - f / 8);
            Vector2 v79 = new Vector2(v55.X + f * 2, v55.Y + f / 2);
            Vector2 v80 = new Vector2(v71.X, v71.Y + f * 3);
            Vector2 v81 = new Vector2(v71.X, v34.Y + f);
            Vector2 v82 = new Vector2(v73.X, v73.Y - f * 9 / 5);
            Vector2 v83 = new Vector2(v73.X, v58.Y - f - f / 3);
            Vector2 v84 = new Vector2(v27.X + f / 8, v27.Y + f / 6);
            Vector2 v85 = new Vector2(v62.X - f / 3 - 1, v62.Y - (tp - f) - 1);
            Vector2 v86 = new Vector2(v61.X + f - 0.9, v45.Y + f + f / 8);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v7));
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes[0].Bulge = -(s1 - s) / 10;
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v3, v5 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Vector2[] Line5 = { v5, v6 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v4));
            Arc2.Vertexes.Add(new LwPolylineVertex(v8));
            Arc2.Vertexes[0].Bulge = -(s1 - s) / 6;
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            Vector2[] Line6 = { v2, v7 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            Vector2[] Line7 = { v6, v8 };
            fun.drawBLine(dxf, Line7, 0.3, contour);
            Vector2[] Line8 = { v5, v9 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            Vector2[] Line9 = { v6, v10 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Vector2[] Line10 = { v10, v9 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v11, v9 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v11, v13 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v14, v13 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v12, v14 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            Vector2[] Line15 = { v15, v14 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v15, v16 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            Vector2[] Line17 = { v10, v17 };
            fun.drawBLine(dxf, Line17, 0.3, contour);
            Vector2[] Line18 = { v18, v17 };
            fun.drawBLine(dxf, Line18, 0.3, contour);
            //局部图2
            Vector2[] Line19 = { v19, v20 };
            fun.drawBLine(dxf, Line19, 0.3, contour);
            Vector2[] Line20 = { v19, v21 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            Vector2[] Line21 = { v21, v22 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v22));
            Arc3.Vertexes.Add(new LwPolylineVertex(v23));
            Arc3.Vertexes[0].Bulge = ((tp - f) / 3) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc3, 0.3, contour);
            Vector2[] Line22 = { v23, v24 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v24));
            Arc4.Vertexes.Add(new LwPolylineVertex(v25));
            Arc4.Vertexes[0].Bulge = -((s - f) / 2) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Vector2[] Line23 = { v25, v26 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v26));
            Arc5.Vertexes.Add(new LwPolylineVertex(v27));
            Arc5.Vertexes[0].Bulge = ((s - f) / 2) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            Vector2[] Line24 = { v27, v28 };
            fun.drawBLine(dxf, Line24, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v28));
            Arc6.Vertexes.Add(new LwPolylineVertex(v29));
            Arc6.Vertexes[0].Bulge = -((s - f) / 2) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            Vector2[] Line25 = { v29, v30 };
            fun.drawBLine(dxf, Line25, 0.3, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v30));
            Arc7.Vertexes.Add(new LwPolylineVertex(v31));
            Arc7.Vertexes[0].Bulge = f / 18;
            fun.PolyFill(dxf, Arc7, 0.3, contour);
            Vector2[] Line26 = { v31, v32 };
            fun.drawBLine(dxf, Line26, 0.3, contour);
            Vector2[] Line27 = { v20, v32 };
            fun.drawBLine(dxf, Line27, 0.3, contour);
            //主视图
            Vector2[] Line28 = { v33, v34 };
            fun.drawBLine(dxf, Line28, 0.3, contour);
            Vector2[] Line29 = { v34, v35 };
            fun.drawBLine(dxf, Line29, 0.3, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v35));
            Arc8.Vertexes.Add(new LwPolylineVertex(v36));
            Arc8.Vertexes[0].Bulge = ((tp - f) / 3) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc8, 0.3, contour);
            Vector2[] Line30 = { v36, v37 };
            fun.drawBLine(dxf, Line30, 0.3, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v37));
            Arc9.Vertexes.Add(new LwPolylineVertex(v38));
            Arc9.Vertexes[0].Bulge = -((s - f) / 5) / Math.Tan(pna / 2);
            fun.PolyFill(dxf, Arc9, 0.3, contour);
            Vector2[] Line31 = { v38, v39 };
            fun.drawBLine(dxf, Line31, 0.3, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v39));
            Arc10.Vertexes.Add(new LwPolylineVertex(v40));
            Arc10.Vertexes[0].Bulge = ((tp - f) / 3) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc10, 0.3, contour);
            Vector2[] Line32 = { v40, v41 };
            fun.drawBLine(dxf, Line32, 0.3, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v70));
            Arc11.Vertexes.Add(new LwPolylineVertex(v71));
            Arc11.Vertexes[0].Bulge = f / 16;
            fun.PolyFill(dxf, Arc11, 0.3, contour);
            //Vector2[] Line33 = { v42, v43 };
            //fun.drawBLine(dxf, Line33, 0.3, contour);
            //Vector2[] Line34 = { v33, v43 };
            //fun.drawBLine(dxf, Line34, 0.3, contour);
            Vector2[] Line35 = { v33, v44 };
            fun.drawBLine(dxf, Line35, 0.3, contour);
            Vector2[] Line36 = { v44, v45 };
            fun.drawBLine(dxf, Line36, 0.3, contour);
            Vector2[] Line37 = { v45, v46 };
            fun.drawBLine(dxf, Line37, 0.3, contour);
            Vector2[] Line38 = { v46, v47 };
            fun.drawBLine(dxf, Line38, 0.3, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v47));
            Arc12.Vertexes.Add(new LwPolylineVertex(v48));
            Arc12.Vertexes[0].Bulge = f / 14;
            fun.PolyFill(dxf, Arc12, 0.3, contour);
            Vector2[] Line39 = { v48, v49 };
            fun.drawBLine(dxf, Line39, 0.3, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v49));
            Arc13.Vertexes.Add(new LwPolylineVertex(v50));
            Arc13.Vertexes[0].Bulge = -((s - f) / 2) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc13, 0.3, contour);
            Vector2[] Line40 = { v50, v51 };
            fun.drawBLine(dxf, Line40, 0.3, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v51));
            Arc14.Vertexes.Add(new LwPolylineVertex(v52));
            Arc14.Vertexes[0].Bulge = ((s - f) / 2) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc14, 0.3, contour);
            Vector2[] Line41 = { v52, v53 };
            fun.drawBLine(dxf, Line41, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v53));
            Arc15.Vertexes.Add(new LwPolylineVertex(v54));
            Arc15.Vertexes[0].Bulge = -((s - f) / 2) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            Vector2[] Line42 = { v54, v55 };
            fun.drawBLine(dxf, Line42, 0.3, contour);
            Vector2[] Line43 = { v55, v56 };
            fun.drawBLine(dxf, Line43, 0.3, contour);
            Vector2[] Line44 = { v56, v57 };
            fun.drawBLine(dxf, Line44, 0.3, contour);
            //Vector2[] Line45 = { v43, v59 };
            //fun.drawBLine(dxf, Line45, 0.3, contour);
            //Vector2[] Line46 = { v58, v59 };
            //fun.drawBLine(dxf, Line46, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v57));
            Arc16.Vertexes.Add(new LwPolylineVertex(v60));
            Arc16.Vertexes[0].Bulge = -f / 18;
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            Vector2[] Line47 = { v60, v61 };
            fun.drawBLine(dxf, Line47, 0.3, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v61));
            Arc17.Vertexes.Add(new LwPolylineVertex(v62));
            Arc17.Vertexes[0].Bulge = ((s - f) / 3) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc17, 0.3, contour);
            Vector2[] Line48 = { v62, v63 };
            fun.drawBLine(dxf, Line48, 0.3, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v63));
            Arc18.Vertexes.Add(new LwPolylineVertex(v64));
            Arc18.Vertexes[0].Bulge = -((tp - f) / 3) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc18, 0.3, contour);
            Vector2[] Line49 = { v64, v65 };
            fun.drawBLine(dxf, Line49, 0.3, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v65));
            Arc19.Vertexes.Add(new LwPolylineVertex(v66));
            Arc19.Vertexes[0].Bulge = ((s - f) / 5) / Math.Tan(pna / 2);
            fun.PolyFill(dxf, Arc19, 0.3, contour);
            Vector2[] Line50 = { v66, v67 };
            fun.drawBLine(dxf, Line50, 0.3, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v67));
            Arc20.Vertexes.Add(new LwPolylineVertex(v68));
            Arc20.Vertexes[0].Bulge = -((tp - f) / 3) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc20, 0.3, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v69));
            Arc21.Vertexes.Add(new LwPolylineVertex(v41));
            Arc21.Vertexes[0].Bulge = ((s - f) * 3 / 5) / Math.Tan(pna);
            fun.PolyFill(dxf, Arc21, 0.3, contour);
            Vector2[] Line51 = { v69, v70 };
            fun.drawBLine(dxf, Line51, 0.3, contour);
            Vector2[] Line52 = { v68, v72 };
            fun.drawBLine(dxf, Line52, 0.3, contour);
            Vector2[] Line53 = { v71, v72 };
            fun.drawBLine(dxf, Line53, 0.3, contour);
            Vector2[] Line54 = { v58, v73 };
            fun.drawBLine(dxf, Line54, 0.3, contour);
            Vector2[] Line55 = { v33, v74 };
            fun.drawBLine(dxf, Line55, 0.3, contour);
            Vector2[] Line56 = { v75, v76 };
            fun.drawBLine(dxf, Line56, 0.3, contour);
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v77, 0, 5)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v77, Math.PI, 5)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v77, 0, 5)));
            fun.PolyFill(dxf, poly, 0.3, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v77, 0, 7)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v77, Math.PI, 7)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v77, 0, 7)));
            fun.PolyFill(dxf, poly1, 0.3, contour);
            Vector2[] cenline1 = { new Vector2(v71.X + 1, v71.Y - f * 3 / 2), new Vector2(v45.X, v71.Y - f * 3 / 2) };
            fun.drawPlinetype(dxf, cenline1, 0.15, centre, Linetype.Center);
            Vector2[] cenline2 = { new Vector2(v61.X + f - 1.2, v61.Y + 1), new Vector2(v61.X + f - 0.9, v45.Y + f + f / 8) };
            fun.drawPlinetype(dxf, cenline2, 0.15, centre, Linetype.Center);
            Vector2[] cenline3 = { new Vector2(v45.X, v45.Y), new Vector2(v78.X, v78.Y) };
            fun.drawPlinetype(dxf, cenline3, 0.15, centre, Linetype.Center);
            Vector2[] cenline4 = { new Vector2(v55.X, v55.Y), new Vector2(v79.X, v79.Y) };
            fun.drawPlinetype(dxf, cenline4, 0.15, centre, Linetype.Center);
            Vector2[] cenline5 = { new Vector2(v71.X, v71.Y), new Vector2(v80.X, v80.Y) };
            fun.drawPlinetype(dxf, cenline5, 0.15, centre, Linetype.Center);
            Vector2[] cenline6 = { new Vector2(v34.X, v34.Y), new Vector2(v81.X, v81.Y) };
            fun.drawPlinetype(dxf, cenline6, 0.15, centre, Linetype.Center);
            Vector2[] cenline7 = { new Vector2(v73.X, v73.Y), new Vector2(v82.X, v82.Y) };
            fun.drawPlinetype(dxf, cenline7, 0.15, centre, Linetype.Center);
            Vector2[] cenline8 = { new Vector2(v58.X, v58.Y), new Vector2(v83.X, v83.Y) };
            fun.drawPlinetype(dxf, cenline8, 0.15, centre, Linetype.Center);
            Circle circle1 = new Circle(v77, O);
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            dxf.AddEntity(circle1);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //主视图
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v1.X, v1.Y), new Vector2(v16.X, v16.Y)), -offset * 2, 180, dimensionStyle);
            dim1.UserText = "S1";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(v11.X, v11.Y), new Vector2(v13.X, v13.Y)), -offset * 1 / 2, 360, dimensionStyle);
            dim2.UserText = "S";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(v22.X + 1, v22.Y), new Vector2(v27.X - 1, v27.Y)), -offset * 1 / 2, 360, dimensionStyle);
            dim3.UserText = "TP";
            dxf.AddEntity(dim3);
            //尺寸4
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v27, v84), new Line(v27, v26), offset * 1 / 2, dimensionStyle);
            angdim4.UserText = "PNA";
            dxf.AddEntity(angdim4);
            //尺寸5
            LinearDimension dim5 = new LinearDimension(new Line(new Vector2(v71.X, v81.Y), new Vector2(v71.X, v83.Y)), offset * 2, 90, dimensionStyle);
            dim5.UserText = "L";
            dxf.AddEntity(dim5);
            //尺寸6
            LinearDimension dim6 = new LinearDimension(new Line(new Vector2(v85.X, v85.Y), new Vector2(v71.X, v83.Y)), offset * 2, 180, dimensionStyle);
            dim6.UserText = "PDX";
            dxf.AddEntity(dim6);
            //尺寸7
            LinearDimension dim7 = new LinearDimension(new Line(new Vector2(v85.X, v85.Y), new Vector2(v71.X, v83.Y)), offset, 90, dimensionStyle);
            dim7.UserText = "PDY";
            dxf.AddEntity(dim7);
            //尺寸8
            LinearDimension dim8 = new LinearDimension(new Line(new Vector2(v86.X, v86.Y), new Vector2(v61.X, v61.Y)), offset * 4, 270, dimensionStyle);
            dim8.UserText = "IC";
            dxf.AddEntity(dim8);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE16(Dictionary<string, Object> data)//ISO 13399-2 图片E.16
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double s1 = 6;
            double d1 = 4;
            double ic = 17;
            double s = 5.6;
            double pi = Math.PI;
            double espr = 46 * pi / 180;
            double ren = 153 * pi / 180;
            double re = 60 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //局部图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + d1 / 4, 0);
            Vector2 v3 = new Vector2(v1.X, v2.Y + s);
            Vector2 v4 = new Vector2(v2.X, v3.Y);
            Vector2 v5 = new Vector2(v2.X + d1 / 8 / Math.Tan(espr), v2.Y - d1 / 6);
            Vector2 v6 = new Vector2(v4.X + d1 / 6 / Math.Tan(espr), v4.Y + d1 / 6);
            Vector2 v7 = new Vector2(v6.X + ic, v6.Y);
            Vector2 v8 = new Vector2(v5.X + ic, v5.Y);
            Vector2 v9 = new Vector2(v8.X + d1 / 6 / Math.Tan(espr), v8.Y + d1 / 6);
            Vector2 v10 = new Vector2(v7.X + d1 / 6 / Math.Tan(espr), v7.Y - d1 / 6);
            Vector2 v11 = new Vector2(v9.X + d1 / 4, v9.Y);
            Vector2 v12 = new Vector2(v10.X + d1 / 4, v10.Y);
            Vector2 v13 = new Vector2(v7.X - ic / 3, v7.Y);
            Vector2 v14 = new Vector2(v8.X - ic / 3, v8.Y);
            Vector2 v15 = new Vector2(v5.X + ic / 3, v5.Y);
            Vector2 v16 = new Vector2(v6.X + ic / 3, v6.Y);
            Vector2 v17 = new Vector2(v13.X - d1 / 4, v13.Y - d1 / 4);
            Vector2 v18 = new Vector2(v14.X - d1 / 4, v14.Y + d1 / 4);
            Vector2 v19 = new Vector2(v15.X + d1 / 4, v15.Y + d1 / 4);
            Vector2 v20 = new Vector2(v16.X + d1 / 4, v16.Y - d1 / 4);
            Vector2 v21 = new Vector2(v5.X + ic / 2, v5.Y);
            Vector2 v22 = new Vector2(v6.X + ic / 2, v6.Y);
            //主视图
            Vector2 v23 = new Vector2(v22.X, v6.Y - 20);
            Vector2 v24 = new Vector2(v23.X, v23.Y - ic / 2 - s1);
            Vector2 v25 = new Vector2(v23.X - ic * Math.Tan(espr / 2) - ic / 22, v23.Y - ic / 3 - s1 + s1 / 6);
            Vector2 v26 = new Vector2(v23.X + ic * Math.Tan(espr / 2) + ic / 22, v25.Y);
            Vector2 v27 = new Vector2(v22.X - Math.Sin(espr / 2) * d1 / 4, v6.Y - 20 - Math.Cos(espr / 2) * d1 / 4);
            Vector2 v28 = new Vector2(v22.X + Math.Sin(espr / 2) * d1 / 4, v27.Y);
            Vector2 v29 = new Vector2(v25.X - (ic / 8) * Math.Tan(ren / 4), v25.Y - ic / 2 - ic / 16);
            Vector2 v30 = new Vector2(v26.X + (ic / 8) * Math.Tan(ren / 4), v26.Y - ic / 2 - ic / 16);
            Vector2 v31 = new Vector2(v30.X - Math.Sin(re / 2) * d1 / 4, v30.Y - Math.Cos(re / 2) * d1 / 4);
            Vector2 v32 = new Vector2(v23.X, v23.Y - ic - ic * 11 / 30);
            Vector2 v33 = new Vector2(v29.X + Math.Sin(re / 2) * d1 / 4, v29.Y - Math.Cos(re / 2) * d1 / 4);
            Vector2 v34 = new Vector2(v22.X, v6.Y - 20 - s1 / 3);
            Vector2 v35 = new Vector2(v34.X - ic * Math.Tan(espr / 2) + s1 / 10, v34.Y - ic / 3 - s1 + s1 / 3);
            Vector2 v36 = new Vector2(v34.X + ic * Math.Tan(espr / 2) - s1 / 10, v35.Y);
            Vector2 v37 = new Vector2(v22.X - Math.Sin(espr / 3) * d1 / 6, v34.Y - Math.Cos(espr / 2) * d1 / 5);
            Vector2 v38 = new Vector2(v22.X + Math.Sin(espr / 3) * d1 / 4, v37.Y);
            Vector2 v39 = new Vector2(v35.X - (ic / 8) * Math.Tan(ren / 4), v35.Y - ic / 2 + ic / 18);
            Vector2 v40 = new Vector2(v36.X + (ic / 8) * Math.Tan(ren / 4), v39.Y);
            Vector2 v41 = new Vector2(v40.X - Math.Sin(re / 2) * d1 / 4, v40.Y - Math.Cos(re / 2) * d1 / 4);
            Vector2 v42 = new Vector2(v34.X, v34.Y - ic - s1 / 4 - d1 / 4);
            Vector2 v43 = new Vector2(v39.X + Math.Sin(re / 2) * d1 / 4, v39.Y - Math.Cos(re / 2) * d1 / 4);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v5, v2 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Vector2[] Line5 = { v4, v6 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v7, v6 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            Vector2[] Line7 = { v8, v5 };
            fun.drawBLine(dxf, Line7, 0.3, contour);
            Vector2[] Line8 = { v8, v9 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            Vector2[] Line9 = { v7, v10 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Vector2[] Line10 = { v9, v11 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v10, v12 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v11, v12 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] cenline1 = { new Vector2(v13.X, v13.Y), new Vector2(v17.X, v17.Y) };
            fun.drawPlinetype(dxf, cenline1, 0.15, centre, Linetype.Center);
            Vector2[] cenline2 = { new Vector2(v14.X, v14.Y), new Vector2(v18.X, v18.Y) };
            fun.drawPlinetype(dxf, cenline2, 0.15, centre, Linetype.Center);
            Vector2[] cenline3 = { new Vector2(v17.X, v17.Y), new Vector2(v18.X, v18.Y) };
            fun.drawPlinetype(dxf, cenline3, 0.15, centre, Linetype.Center);
            Vector2[] cenline4 = { new Vector2(v15.X, v15.Y), new Vector2(v19.X, v19.Y) };
            fun.drawPlinetype(dxf, cenline4, 0.15, centre, Linetype.Center);
            Vector2[] cenline5 = { new Vector2(v18.X, v18.Y), new Vector2(v19.X, v19.Y) };
            fun.drawPlinetype(dxf, cenline5, 0.15, centre, Linetype.Center);
            Vector2[] cenline6 = { new Vector2(v16.X, v16.Y), new Vector2(v20.X, v20.Y) };
            fun.drawPlinetype(dxf, cenline6, 0.15, centre, Linetype.Center);
            Vector2[] cenline7 = { new Vector2(v19.X, v19.Y), new Vector2(v20.X, v20.Y) };
            fun.drawPlinetype(dxf, cenline7, 0.15, centre, Linetype.Center);
            Vector2[] cenline8 = { new Vector2(v17.X, v17.Y), new Vector2(v20.X, v20.Y) };
            fun.drawPlinetype(dxf, cenline8, 0.15, centre, Linetype.Center);
            Vector2[] cenline9 = { new Vector2(v21.X + 0.12, v21.Y + s1 + s1 / 6), new Vector2(v22.X - 0.12, v22.Y - s1 - s1 / 6) };
            fun.drawPlinetype(dxf, cenline9, 0.15, centre, Linetype.Center);
            Circle circle1 = new Circle(v24, ic / 2);
            circle1.Layer = centre;
            circle1.Linetype = Linetype.DashDot;
            dxf.AddEntity(circle1);
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v24, 0, ic / 6)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v24, Math.PI, ic / 6)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v24, 0, ic / 6)));
            fun.PolyFill(dxf, poly, 0.3, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v24, 0, ic / 6 + 1)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v24, Math.PI, ic / 6 + 1)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v24, 0, ic / 6 + 1)));
            fun.PolyFill(dxf, poly1, 0.3, contour);
            Vector2[] Line13 = { v27, v25 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v27));
            Arc1.Vertexes.Add(new LwPolylineVertex(v28));
            Arc1.Vertexes[0].Bulge = -(Math.Sin(espr / 2) * d1 / 8) / Math.Tan(espr / 2);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line14 = { v28, v26 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            Vector2[] Line15 = { v25, v29 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v26, v30 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v30));
            Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            Arc2.Vertexes[0].Bulge = -(Math.Sin(espr / 2) * d1 / 9) / Math.Tan(espr / 2);
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            Vector2[] Line17 = { v31, v32 };
            fun.drawBLine(dxf, Line17, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v33));
            Arc3.Vertexes.Add(new LwPolylineVertex(v29));
            Arc3.Vertexes[0].Bulge = -(Math.Sin(espr / 2) * d1 / 9) / Math.Tan(espr / 2);
            fun.PolyFill(dxf, Arc3, 0.3, contour);
            Vector2[] Line18 = { v33, v32 };
            fun.drawBLine(dxf, Line18, 0.3, contour);
            Vector2[] Line19 = { v37, v35 };
            fun.drawBLine(dxf, Line19, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v37));
            Arc4.Vertexes.Add(new LwPolylineVertex(v38));
            Arc4.Vertexes[0].Bulge = -(Math.Sin(espr / 2) * d1 / 9) / Math.Tan(espr / 2);
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Vector2[] Line20 = { v38, v36 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            Vector2[] Line21 = { v35, v39 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            Vector2[] Line22 = { v36, v40 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v40));
            Arc5.Vertexes.Add(new LwPolylineVertex(v41));
            Arc5.Vertexes[0].Bulge = -(Math.Sin(espr / 2) * d1 / 9) / Math.Tan(espr / 2);
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            Vector2[] Line23 = { v41, v42 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v43));
            Arc6.Vertexes.Add(new LwPolylineVertex(v39));
            Arc6.Vertexes[0].Bulge = -(Math.Sin(espr / 2) * d1 / 9) / Math.Tan(espr / 2);
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            Vector2[] Line24 = { v43, v42 };
            fun.drawBLine(dxf, Line24, 0.3, contour);
            Vector2[] cenline10 = { new Vector2(v24.X, v24.Y), new Vector2(v24.X, v24.Y + ic / 2 + 2) };
            fun.drawPlinetype(dxf, cenline10, 0.15, centre, Linetype.Center);
            Vector2[] cenline11 = { new Vector2(v24.X, v24.Y), new Vector2(v24.X, v24.Y - ic / 2 - 2) };
            fun.drawPlinetype(dxf, cenline11, 0.15, centre, Linetype.Center);
            Vector2[] cenline12 = { new Vector2(v24.X, v24.Y), new Vector2(v24.X + ic / 2 + 2, v24.Y) };
            fun.drawPlinetype(dxf, cenline12, 0.15, centre, Linetype.Center);
            Vector2[] cenline13 = { new Vector2(v24.X, v24.Y), new Vector2(v24.X - ic / 2 - 2, v24.Y) };
            fun.drawPlinetype(dxf, cenline13, 0.15, centre, Linetype.Center);
            //标注样式
            //箭头样式
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 1.0 / 2;
            double offset = 10;
            //线段尺寸标注
            //主视图
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v3.X, v3.Y), new Vector2(v5.X, v5.Y)), -offset, 270, dimensionStyle);
            dim1.UserText = "S";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(v18.X, v18.Y), new Vector2(v19.X, v19.Y)), -offset, 360, dimensionStyle);
            dim2.UserText = "D1";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(v5.X, v5.Y), new Vector2(v6.X, v6.Y)), -offset * 2, 90, dimensionStyle);
            dim3.UserText = "S1";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(new Vector2(v23.X, v23.Y), new Vector2(v25.X, v25.Y)), -offset * 2, 270, dimensionStyle);
            dim4.UserText = "L";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(new Vector2(v24.X - ic / 2, v24.Y), new Vector2(v24.X + ic / 2, v24.Y)), -offset * 2, 360, dimensionStyle);
            dim5.UserText = "IC";
            dxf.AddEntity(dim5);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE17(Dictionary<string, Object> data)//ISO 13399-2 图片E.17
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double pi = Math.PI;
            double l = 8;
            double n2 = 16;
            double epsr = 38 * pi / 180;
            double re = 28 * pi / 180;
            double k = 3;
            double w1 = 20;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2), v1.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v3 = new Vector2(v2.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2), v2.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v4 = new Vector2(v3.X + Math.Tan(epsr) / Math.Tan(epsr / 2), v3.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3);
            Vector2 v5 = new Vector2(v1.X - Math.Tan(epsr) / Math.Tan(epsr / 2), v1.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3);
            Vector2 v6 = new Vector2(v5.X + Math.Tan(epsr / 2) / Math.Tan(epsr) + k / 24 + k * Math.Tan(epsr / 2), v5.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k);
            Vector2 v7 = new Vector2(v4.X - Math.Tan(epsr / 2) / Math.Tan(epsr) - k / 24 - k * Math.Tan(epsr / 2), v4.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k);
            Vector2 v8 = new Vector2(v1.X, v1.Y - 0.5);
            Vector2 v9 = new Vector2(v8.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2), v8.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v10 = new Vector2(v9.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2) - 0.2, v9.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v11 = new Vector2(v10.X + Math.Tan(epsr) / Math.Tan(epsr / 2) - 0.3, v10.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3 + k / 6);
            Vector2 v12 = new Vector2(v8.X - Math.Tan(epsr) / Math.Tan(epsr / 2) + 0.5, v8.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3 + k / 6);
            Vector2 v13 = new Vector2(v12.X + Math.Tan(epsr / 2) / Math.Tan(epsr) + k / 24 + k * Math.Tan(epsr / 2), v12.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k / 11 - k);
            Vector2 v14 = new Vector2(v11.X - Math.Tan(epsr / 2) / Math.Tan(epsr) - k / 24 - k * Math.Tan(epsr / 2), v11.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k / 11 - k);
            Vector2 v15 = new Vector2(v1.X, v1.Y - 1);
            Vector2 v16 = new Vector2(v15.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2), v15.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v17 = new Vector2(v16.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2) - 0.4, v16.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v18 = new Vector2(v17.X + Math.Tan(epsr) / Math.Tan(epsr / 2) - 0.6, v17.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3 + k / 3);
            Vector2 v19 = new Vector2(v15.X - Math.Tan(epsr) / Math.Tan(epsr / 2) + 1, v15.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3 + k / 3);
            Vector2 v20 = new Vector2(v19.X + Math.Tan(epsr / 2) / Math.Tan(epsr) + k / 24 + k * Math.Tan(epsr / 2), v19.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k / 11 - k + 0.3);
            Vector2 v21 = new Vector2(v18.X - Math.Tan(epsr / 2) / Math.Tan(epsr) - k / 24 - k * Math.Tan(epsr / 2), v18.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k / 11 - k + 0.3);
            Vector2 v22 = new Vector2(v1.X + k / 8, v1.Y - 2);
            Vector2 v23 = new Vector2(v22.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2) - k / 8, v22.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v24 = new Vector2(v23.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2) - 0.8, v23.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v25 = new Vector2(v24.X + Math.Tan(epsr) / Math.Tan(epsr / 2) - 1.2, v24.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3 + k * 2 / 3);
            Vector2 v26 = new Vector2(v22.X - Math.Tan(epsr) / Math.Tan(epsr / 2) + 1.8, v22.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3 + k * 2 / 3);
            Vector2 v27 = new Vector2(v26.X + Math.Tan(epsr / 2) / Math.Tan(epsr) + k / 20 + k * Math.Tan(epsr / 2), v26.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k / 11 - k + 0.5 + k / 8);
            Vector2 v28 = new Vector2(v25.X - Math.Tan(epsr / 2) / Math.Tan(epsr) + k / 24 - k * Math.Tan(epsr / 2), v25.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k / 11 - k + 0.5 + 0.3);
            Vector2 v29 = new Vector2(v22.X + k / 2, v1.Y - 4);
            Vector2 v30 = new Vector2(v29.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2) - k / 2, v29.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v31 = new Vector2(v30.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2) - 1.8, v30.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v32 = new Vector2(v31.X + Math.Tan(epsr) / Math.Tan(epsr / 2) - 2, v31.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3 + k);
            Vector2 v33 = new Vector2(v29.X - Math.Tan(epsr) / Math.Tan(epsr / 2) + 2, v29.Y - (n2 * Math.Tan(epsr / 2)) * 2 / 3 + k);
            Vector2 v34 = new Vector2(v33.X + Math.Tan(epsr / 2) / Math.Tan(epsr) - k / 24 + k / 2 * Math.Tan(epsr / 2), v33.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k * 4 / 11 - k / 2);
            Vector2 v35 = new Vector2(v32.X - Math.Tan(epsr / 2) / Math.Tan(epsr) + k / 24 - k / 2 * Math.Tan(epsr / 2), v32.Y - (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k * 4 / 11 - k / 2);
            Vector2 v36 = new Vector2(v7.X, v7.Y - (w1 - (v7.Y - v2.Y)) + k * 12 / 10);
            Vector2 v37 = new Vector2(v6.X, v6.Y - (w1 - (v7.Y - v2.Y)) + k * 12 / 10);
            Vector2 v38 = new Vector2(v20.X, v20.Y - k / 2);
            Vector2 v39 = new Vector2(v38.X, v38.Y - (w1 - (v7.Y - v2.Y)) + k / 2 + k * 12 / 10 + k / 6);
            Vector2 v40 = new Vector2(v14.X, v14.Y - k / 3);
            Vector2 v41 = new Vector2(v40.X, v40.Y - (w1 - (v7.Y - v2.Y)) + k / 2 + k + k / 6);
            Vector2 v42 = new Vector2(v27.X, v27.Y - (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 4 - k / 10);
            Vector2 v43 = new Vector2(v42.X, v42.Y - (w1 - (v7.Y - v2.Y)) + (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 4 + k * 12 / 10 + k / 10);
            Vector2 v44 = new Vector2(v28.X, v28.Y - (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 4);
            Vector2 v45 = new Vector2(v44.X, v44.Y - (w1 - (v7.Y - v2.Y)) + (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 4 + k * 12 / 10 - k / 10);
            Vector2 v46 = new Vector2(v2.X, v42.Y - (w1 - (v7.Y - v2.Y)) / 2 + (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 4);
            Vector2 v47 = new Vector2(v46.X, v46.Y + k * 2);
            Vector2 v48 = new Vector2(v47.X, v47.Y + 2);
            Vector2 v49 = new Vector2(v46.X + k * 2, v46.Y);
            Vector2 v50 = new Vector2(v49.X + 2, v49.Y);
            Vector2 v51 = new Vector2(v46.X, v46.Y - k * 2);
            Vector2 v52 = new Vector2(v51.X, v51.Y - 2);
            Vector2 v53 = new Vector2(v46.X - k * 2, v46.Y);
            Vector2 v54 = new Vector2(v53.X - 2, v53.Y);
            Vector2 v55 = new Vector2(v1.X, v1.Y - (((n2 * Math.Tan(epsr / 2)) * 2 / 3 + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k + w1 + (v7.Y + v2.Y))) * 2);
            Vector2 v56 = new Vector2(v55.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2), v55.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v57 = new Vector2(v56.X + ((n2 * Math.Tan(epsr / 2))) / Math.Tan(epsr / 2), v56.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v58 = new Vector2(v57.X + Math.Tan(epsr) / Math.Tan(epsr / 2), v57.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3);
            Vector2 v59 = new Vector2(v55.X - Math.Tan(epsr) / Math.Tan(epsr / 2), v55.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3);
            Vector2 v60 = new Vector2(v59.X + Math.Tan(epsr / 2) / Math.Tan(epsr) + k / 24 + k * Math.Tan(epsr / 2), v59.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k);
            Vector2 v61 = new Vector2(v58.X - Math.Tan(epsr / 2) / Math.Tan(epsr) - k / 24 - k * Math.Tan(epsr / 2), v58.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) + k);
            Vector2 v62 = new Vector2(v55.X - k / 8, v55.Y + 0.5);
            Vector2 v63 = new Vector2(v9.X, v62.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v64 = new Vector2(v10.X, v63.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v65 = new Vector2(v64.X + Math.Tan(epsr) / Math.Tan(epsr / 2) - 0.6, v64.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3 - k / 6);
            Vector2 v66 = new Vector2(v62.X - Math.Tan(epsr) / Math.Tan(epsr / 2) + 1, v62.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3 - k / 6);
            Vector2 v67 = new Vector2(v13.X, v66.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k / 11 + k);
            Vector2 v68 = new Vector2(v14.X, v65.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k / 11 + k);
            Vector2 v69 = new Vector2(v55.X - k / 8, v55.Y + 1);
            Vector2 v70 = new Vector2(v16.X, v69.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v71 = new Vector2(v17.X, v70.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v72 = new Vector2(v71.X + Math.Tan(epsr) / Math.Tan(epsr / 2) - 0.9, v71.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3 - k / 3);
            Vector2 v73 = new Vector2(v69.X - Math.Tan(epsr) / Math.Tan(epsr / 2) + 1.5, v69.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3 - k / 3);
            Vector2 v74 = new Vector2(v20.X, v73.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k / 11 + k - 0.1);
            Vector2 v75 = new Vector2(v21.X, v72.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k / 11 + k - 0.1);
            Vector2 v76 = new Vector2(v55.X + k / 8, v55.Y + 2);
            Vector2 v77 = new Vector2(v23.X, v76.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v78 = new Vector2(v24.X + k / 8, v77.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v79 = new Vector2(v78.X + Math.Tan(epsr) / Math.Tan(epsr / 2) - 1.5, v78.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3 - k);
            Vector2 v80 = new Vector2(v76.X - Math.Tan(epsr) / Math.Tan(epsr / 2) + 2, v76.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3 - k);
            Vector2 v81 = new Vector2(v27.X, v80.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k / 11 + k - 0.5 + k * 1 / 3);
            Vector2 v82 = new Vector2(v28.X, v79.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k / 11 + k - 0.5 + k * 1 / 3);
            Vector2 v83 = new Vector2(v55.X + k * 3 / 4, v55.Y + 4);
            Vector2 v84 = new Vector2(v30.X, v83.Y - (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v85 = new Vector2(v31.X - k / 8, v84.Y + (n2 * Math.Tan(epsr / 2)) * 1 / 3);
            Vector2 v86 = new Vector2(v85.X + Math.Tan(epsr) / Math.Tan(epsr / 2) - 2, v85.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3 - k);
            Vector2 v87 = new Vector2(v83.X - Math.Tan(epsr) / Math.Tan(epsr / 2) + 2, v83.Y + (n2 * Math.Tan(epsr / 2)) * 2 / 3 - k);
            Vector2 v88 = new Vector2(v34.X, v87.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k * 4 / 11 + k * 3 / 4);
            Vector2 v89 = new Vector2(v35.X, v86.Y + (Math.Tan(epsr) / Math.Tan(epsr / 2)) * Math.Tan(epsr) - k * 4 / 11 + k * 3 / 4);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v3 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v1));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v4, v7 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Vector2[] Line5 = { v8, v9 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v9, v10 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v10));
            Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            Arc3.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc3, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v8));
            Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            Arc4.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Vector2[] Line7 = { v12, v13 };
            fun.drawBLine(dxf, Line7, 0.3, contour);
            Vector2[] Line8 = { v11, v14 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            Vector2[] Line9 = { v15, v16 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Vector2[] Line10 = { v16, v17 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v17));
            Arc5.Vertexes.Add(new LwPolylineVertex(v18));
            Arc5.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v15));
            Arc6.Vertexes.Add(new LwPolylineVertex(v19));
            Arc6.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            Vector2[] Line11 = { v19, v20 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v18, v21 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v22, v23 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v23, v24 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v24));
            Arc7.Vertexes.Add(new LwPolylineVertex(v25));
            Arc7.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc7, 0.3, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v22));
            Arc8.Vertexes.Add(new LwPolylineVertex(v26));
            Arc8.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc8, 0.3, contour);
            Vector2[] Line15 = { v26, v27 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v25, v28 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            Vector2[] Line17 = { v29, v30 };
            fun.drawBLine(dxf, Line17, 0.3, contour);
            Vector2[] Line18 = { v30, v31 };
            fun.drawBLine(dxf, Line18, 0.3, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v31));
            Arc9.Vertexes.Add(new LwPolylineVertex(v32));
            Arc9.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr));
            fun.PolyFill(dxf, Arc9, 0.3, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v29));
            Arc10.Vertexes.Add(new LwPolylineVertex(v33));
            Arc10.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr));
            fun.PolyFill(dxf, Arc10, 0.3, contour);
            Vector2[] Line19 = { v33, v34 };
            fun.drawBLine(dxf, Line19, 0.3, contour);
            Vector2[] Line20 = { v32, v35 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            Vector2[] Line21 = { v35, v7 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            Vector2[] Line22 = { v34, v6 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v35));
            Arc11.Vertexes.Add(new LwPolylineVertex(v7));
            Arc11.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 5;
            fun.PolyFill(dxf, Arc11, 0.3, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v34));
            Arc12.Vertexes.Add(new LwPolylineVertex(v6));
            Arc12.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 5;
            fun.PolyFill(dxf, Arc12, 0.3, contour);
            Vector2[] Line23 = { v36, v7 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            Vector2[] Line24 = { v37, v6 };
            fun.drawBLine(dxf, Line24, 0.3, contour);
            Vector2[] Line25 = { v38, v39 };
            fun.drawBLine(dxf, Line25, 0.3, contour);
            Vector2[] Line26 = { v40, v41 };
            fun.drawBLine(dxf, Line26, 0.3, contour);
            Vector2[] Line27 = { v42, v43 };
            fun.drawBLine(dxf, Line27, 0.3, contour);
            Vector2[] Line28 = { v44, v45 };
            fun.drawBLine(dxf, Line28, 0.3, contour);
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, 0, k * 3)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, Math.PI, k * 3)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, 0, k * 3)));
            fun.PolyFill(dxf, poly, 0.3, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, 0, k * 2)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, Math.PI, k * 2)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, 0, k * 2)));
            fun.PolyFill(dxf, poly1, 0.3, contour);
            LwPolyline poly2 = new LwPolyline();
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, 0, k * 3 - 1)));
            poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, Math.PI, k * 3 - 1)));
            poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v46, 0, k * 3 - 1)));
            fun.PolyFill(dxf, poly2, 0.3, contour);
            Vector2[] Line29 = { v47, v48 };
            fun.drawBLine(dxf, Line29, 0.3, contour);
            Vector2[] Line30 = { v49, v50 };
            fun.drawBLine(dxf, Line30, 0.3, contour);
            Vector2[] Line31 = { v51, v52 };
            fun.drawBLine(dxf, Line31, 0.3, contour);
            Vector2[] Line32 = { v53, v54 };
            fun.drawBLine(dxf, Line32, 0.3, contour);
            Vector2[] Line33 = { v55, v56 };
            fun.drawBLine(dxf, Line33, 0.3, contour);
            Vector2[] Line34 = { v57, v56 };
            fun.drawBLine(dxf, Line34, 0.3, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v57));
            Arc13.Vertexes.Add(new LwPolylineVertex(v58));
            Arc13.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc13, 0.3, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v55));
            Arc14.Vertexes.Add(new LwPolylineVertex(v59));
            Arc14.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc14, 0.3, contour);
            Vector2[] Line35 = { v59, v60 };
            fun.drawBLine(dxf, Line35, 0.3, contour);
            Vector2[] Line36 = { v58, v61 };
            fun.drawBLine(dxf, Line36, 0.3, contour);
            Vector2[] Line37 = { v63, v62 };
            fun.drawBLine(dxf, Line37, 0.3, contour);
            Vector2[] Line38 = { v63, v64 };
            fun.drawBLine(dxf, Line38, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v64));
            Arc15.Vertexes.Add(new LwPolylineVertex(v65));
            Arc15.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v62));
            Arc16.Vertexes.Add(new LwPolylineVertex(v66));
            Arc16.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            Vector2[] Line39 = { v66, v67 };
            fun.drawBLine(dxf, Line39, 0.3, contour);
            Vector2[] Line40 = { v68, v65 };
            fun.drawBLine(dxf, Line40, 0.3, contour);
            Vector2[] Line41 = { v69, v70 };
            fun.drawBLine(dxf, Line41, 0.3, contour);
            Vector2[] Line42 = { v71, v70 };
            fun.drawBLine(dxf, Line42, 0.3, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v71));
            Arc17.Vertexes.Add(new LwPolylineVertex(v72));
            Arc17.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc17, 0.3, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v69));
            Arc18.Vertexes.Add(new LwPolylineVertex(v73));
            Arc18.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc18, 0.3, contour);
            Vector2[] Line43 = { v73, v74 };
            fun.drawBLine(dxf, Line43, 0.3, contour);
            Vector2[] Line44 = { v72, v75 };
            fun.drawBLine(dxf, Line44, 0.3, contour);
            Vector2[] Line45 = { v76, v77 };
            fun.drawBLine(dxf, Line45, 0.3, contour);
            Vector2[] Line46 = { v78, v77 };
            fun.drawBLine(dxf, Line46, 0.3, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v78));
            Arc19.Vertexes.Add(new LwPolylineVertex(v79));
            Arc19.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc19, 0.3, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v76));
            Arc20.Vertexes.Add(new LwPolylineVertex(v80));
            Arc20.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc20, 0.3, contour);
            Vector2[] Line47 = { v80, v81 };
            fun.drawBLine(dxf, Line47, 0.3, contour);
            Vector2[] Line48 = { v79, v82 };
            fun.drawBLine(dxf, Line48, 0.3, contour);
            Vector2[] Line49 = { v83, v84 };
            fun.drawBLine(dxf, Line49, 0.3, contour);
            Vector2[] Line50 = { v85, v84 };
            fun.drawBLine(dxf, Line50, 0.3, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v85));
            Arc21.Vertexes.Add(new LwPolylineVertex(v86));
            Arc21.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc21, 0.3, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v83));
            Arc22.Vertexes.Add(new LwPolylineVertex(v87));
            Arc22.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 10;
            fun.PolyFill(dxf, Arc22, 0.3, contour);
            Vector2[] Line51 = { v87, v88 };
            fun.drawBLine(dxf, Line51, 0.3, contour);
            Vector2[] Line52 = { v89, v86 };
            fun.drawBLine(dxf, Line52, 0.3, contour);
            Vector2[] Line53 = { v60, v88 };
            fun.drawBLine(dxf, Line53, 0.3, contour);
            Vector2[] Line54 = { v61, v89 };
            fun.drawBLine(dxf, Line54, 0.3, contour);
            LwPolyline Arc23 = new LwPolyline();
            Arc23.Vertexes.Add(new LwPolylineVertex(v60));
            Arc23.Vertexes.Add(new LwPolylineVertex(v88));
            Arc23.Vertexes[0].Bulge = -(Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 5;
            fun.PolyFill(dxf, Arc23, 0.3, contour);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v61));
            Arc24.Vertexes.Add(new LwPolylineVertex(v89));
            Arc24.Vertexes[0].Bulge = (Math.Tan(epsr / 2) / Math.Tan(epsr)) * 11 / 5;
            fun.PolyFill(dxf, Arc24, 0.3, contour);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 7;
            LinearDimension linedim1 = new LinearDimension(new Line(v2, v56), offset * 5, 270, dimensionStyle);
            fun.dxflinedim(dxf, linedim1, "w1");
            LinearDimension linedim2 = new LinearDimension(new Line(v2, v5), offset * 5, 0, dimensionStyle);
            fun.dxflinedim(dxf, linedim2, "l");
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE18(Dictionary<string, Object> data)//ISO 13399-2 图片E.18
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //作图
                                                                           //参数
            double pi = Math.PI;
            double tp = 4;
            double ntpl = 32;
            double h = 20;
            double epsr = 46 * pi / 180;
            double kpi = 60 * pi / 180;
            double r2 = 3.2;
            double r1 = 4.5;
            double r3 = 8.2;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v2.X + tp * 7 / 10, v2.Y);
            Vector2 v4 = new Vector2(v1.X + tp, v1.Y);
            Vector2 v5 = new Vector2(v3.X + tp * 2 / 5, v3.Y - (tp / 2 / Math.Tan(epsr)));
            Vector2 v6 = new Vector2(v5.X + tp / 2, v5.Y + (tp / 2 / Math.Tan(epsr)) * 6 / 5);
            Vector2 v7 = new Vector2(v4.X + tp / 2, v4.Y + (tp / 2 / Math.Tan(epsr)));
            Vector2 v8 = new Vector2(v7.X + tp / 2, v4.Y);
            Vector2 v9 = new Vector2(v6.X + tp / 6, v6.Y);
            Vector2 v10 = new Vector2(v8.X + tp / 6, v8.Y);
            Vector2 v11 = new Vector2(v9.X + tp / 2, v5.Y);
            Vector2 v12 = new Vector2(v10.X + tp / 2, v7.Y);
            Vector2 v13 = new Vector2(v11.X + tp / 2, v6.Y);
            Vector2 v14 = new Vector2(v12.X + tp / 2, v4.Y);
            Vector2 v15 = new Vector2(v13.X + tp / 6, v13.Y);
            Vector2 v16 = new Vector2(v14.X + tp / 6, v14.Y);
            Vector2 v17 = new Vector2(v15.X + tp / 2, v5.Y);
            Vector2 v18 = new Vector2(v16.X + tp / 2, v7.Y);
            Vector2 v19 = new Vector2(v17.X + tp / 2, v6.Y);
            Vector2 v20 = new Vector2(v18.X + tp / 2, v4.Y);
            Vector2 v21 = new Vector2(v19.X + tp / 6, v13.Y);
            Vector2 v22 = new Vector2(v20.X + tp / 6, v20.Y);
            Vector2 v23 = new Vector2(v21.X + tp / 2, v5.Y);
            Vector2 v24 = new Vector2(v22.X + tp / 2, v7.Y);
            Vector2 v25 = new Vector2(v23.X + tp / 2, v6.Y);
            Vector2 v26 = new Vector2(v24.X + tp / 2, v4.Y);
            Vector2 v27 = new Vector2(v25.X + tp / 6, v13.Y);
            Vector2 v28 = new Vector2(v26.X + tp / 6, v20.Y);
            Vector2 v29 = new Vector2(v27.X + tp / 2, v5.Y);
            Vector2 v30 = new Vector2(v28.X + tp / 2, v7.Y);
            Vector2 v31 = new Vector2(v29.X + tp / 2, v6.Y);
            Vector2 v32 = new Vector2(v30.X + tp / 2, v4.Y);
            Vector2 v33 = new Vector2(v31.X + tp / 6, v13.Y);
            Vector2 v34 = new Vector2(v32.X + tp / 6, v20.Y);
            Vector2 v35 = new Vector2(v33.X + tp / 2, v5.Y);
            Vector2 v36 = new Vector2(v34.X + tp / 2, v7.Y);
            Vector2 v37 = new Vector2(v35.X + tp / 2, v6.Y);
            Vector2 v38 = new Vector2(v36.X + tp / 2, v4.Y);
            Vector2 v39 = new Vector2(v37.X + tp / 6, v13.Y);
            Vector2 v40 = new Vector2(v38.X + tp / 6, v20.Y);
            Vector2 v41 = new Vector2(v39.X + tp / 2, v5.Y);
            Vector2 v42 = new Vector2(v40.X + tp / 2, v7.Y);
            Vector2 v43 = new Vector2(v41.X + tp / 2, v6.Y);
            Vector2 v44 = new Vector2(v42.X + tp / 2, v4.Y);
            Vector2 v45 = new Vector2(v43.X + tp / 6, v13.Y);
            Vector2 v46 = new Vector2(v44.X + tp / 6, v20.Y);
            Vector2 v47 = new Vector2(v45.X + tp / 2, v5.Y);
            Vector2 v48 = new Vector2(v46.X + tp / 2, v7.Y);
            Vector2 v49 = new Vector2(v47.X + tp / 2, v6.Y);
            Vector2 v50 = new Vector2(v48.X + tp / 2, v4.Y);
            Vector2 v51 = new Vector2(v49.X + tp / 6, v13.Y);
            Vector2 v52 = new Vector2(v50.X + tp / 6, v20.Y);
            Vector2 v53 = new Vector2(v51.X + tp / 2, v5.Y);
            Vector2 v54 = new Vector2(v52.X + tp / 2, v7.Y);
            Vector2 v55 = new Vector2(v53.X + tp / 2, v6.Y);
            Vector2 v56 = new Vector2(v54.X + tp / 2, v4.Y);
            Vector2 v57 = new Vector2(v55.X + tp / 6, v13.Y);
            Vector2 v58 = new Vector2(v56.X + tp / 3, v5.Y);
            Vector2 v59 = new Vector2(v57.X + tp * 3 / 10, v57.Y - h * 7 / 10);
            Vector2 v60 = new Vector2(v44.X - 1.7, v44.Y - 9.8);
            Vector2 v61 = new Vector2(v32.X + 0.2, v36.Y - tp);
            Vector2 v62 = new Vector2(v34.X + 0.2, v61.Y);
            Vector2 v63 = new Vector2(v38.X - 0.2, v62.Y);
            Vector2 v64 = new Vector2(v40.X - 0.2, v62.Y);
            Vector2 v65 = new Vector2(v36.X, v36.Y - tp / 4);
            Vector2 v66 = new Vector2(v36.X, v36.Y - tp * 13 / 10);
            Vector2 v67 = new Vector2(v36.X, v36.Y - tp * 14 / 10);
            Vector2 v68 = new Vector2(v38.X - tp / 10, v38.Y - (tp / 9) / Math.Tan(epsr) * 3 / 2);
            Vector2 v69 = new Vector2(v68.X + tp * 2 / 3 + (tp / 9) / Math.Tan(epsr), v68.Y);
            Vector2 v70 = new Vector2(v44.X, v38.Y - ((tp / 9) / Math.Tan(epsr / 2)) * 3 / 2);
            Vector2 v71 = new Vector2(v61.X - tp / 4, v61.Y - ((tp / 9) / Math.Tan(epsr)));
            Vector2 v72 = new Vector2(v71.X, v71.Y - tp * 3 / 2);
            Vector2 v73 = new Vector2(v71.X, v71.Y - tp * 7 / 4);
            Vector2 v74 = new Vector2(v55.X, v71.Y - Math.Tan(kpi / 2) * tp);
            Vector2 v75 = new Vector2(v71.X, v71.Y - tp * 6 / 5);
            Vector2 v76 = new Vector2(v70.X - tp / 7, v70.Y + ((tp / 9) / Math.Tan(epsr / 2)) * 6 / 20);
            Vector2 v77 = new Vector2(v72.X, v72.Y - tp * 3 / 2);
            Vector2 v78 = new Vector2(v74.X, v74.Y - ((tp / 9) / Math.Tan(epsr)) * 13 / 10);
            Vector2 v79 = new Vector2(v58.X, v78.Y - tp * 11 / 10);
            Vector2 v80 = new Vector2(v53.X, v78.Y - tp * 13 / 30);
            Vector2 v81 = new Vector2(v80.X, v79.Y);
            Vector2 v82 = new Vector2(v74.X, v78.Y - ((tp / 9) / Math.Tan(epsr)) * 3 / 2);
            Vector2 v83 = new Vector2(v79.X - ((tp / 9) / Math.Tan(epsr)) * 3 / 2, v78.Y - tp);
            Vector2 v84 = new Vector2(v53.X + ((tp / 9) / Math.Tan(epsr)), v78.Y - tp * 14 / 30 - ((tp / 9) / Math.Tan(epsr)) / 2);
            Vector2 v85 = new Vector2(v84.X, v83.Y);
            Vector2 v86 = new Vector2(v81.X + ((tp / 9) / Math.Tan(epsr / 2)) * 3 / 2, v81.Y);
            Vector2 v87 = new Vector2(v86.X - ((tp / 9) / Math.Tan(epsr / 2)) * 1 / 2, v86.Y - ((tp / 9) / Math.Tan(epsr / 2)) * 3 / 5);
            Vector2 v88 = new Vector2(v87.X + ((tp / 9) / Math.Tan(epsr / 2)) * 1 / 4, v87.Y - ((tp / 9) / Math.Tan(epsr / 2)) * 4 / 5);
            Vector2 v89 = new Vector2(v87.X - ((tp / 9) / Math.Tan(epsr / 2)), v88.Y - ((tp / 9) / Math.Tan(epsr / 2)) * 5 / 2);
            Vector2 v90 = new Vector2(v43.X, v89.Y - tp * 8 / 5);
            Vector2 v91 = new Vector2(v46.X + tp * 3 / 10, v89.Y - tp * 4 / 5);
            Vector2 v92 = new Vector2(v72.X, v72.Y - tp);
            Vector2 v93 = new Vector2(v91.X - tp / 6, v91.Y - tp / 5);
            Vector2 v94 = new Vector2(v72.X, v92.Y - tp / 5);
            Vector2 v95 = new Vector2(v91.X - tp / 3, v93.Y - tp / 6);
            Vector2 v96 = new Vector2(v50.X, v78.Y + ((tp / 9) / Math.Tan(epsr / 2)) * 8 / 5);
            Vector2 v97 = new Vector2(v89.X - ((tp / 9) / Math.Tan(epsr / 2)) * 4 / 5, v89.Y - ((tp / 9) / Math.Tan(epsr / 2)) / 2 - ((tp / 9) / Math.Tan(epsr / 2)) * 1 / 7);
            Vector2 v98 = new Vector2(v89.X - ((tp / 9) / Math.Tan(epsr / 2)) * 11 / 5 + ((tp / 9) / Math.Tan(epsr / 2)), v89.Y - ((tp / 9) / Math.Tan(epsr / 2)) * 4 / 5);
            Vector2 v99 = new Vector2(v96.X - ((tp / 9) / Math.Tan(epsr / 2)), v78.Y + ((tp / 9) / Math.Tan(epsr / 2)) * 2);
            Vector2 v100 = new Vector2(v96.X - ((tp / 9) / Math.Tan(epsr / 2)) * 9 / 5, v96.Y + ((tp / 9) / Math.Tan(epsr / 2)) * 4 / 5);
            Vector2 v101 = new Vector2(v77.X + tp * 3 / 5, v77.Y - tp * 7 / 10);
            Vector2 v102 = new Vector2(v101.X + ((tp / 9) / Math.Tan(epsr / 2)), v101.Y - ((tp / 9) / Math.Tan(epsr / 2)) * 2 / 5);
            Vector2 v103 = new Vector2(v102.X + ((tp / 9) / Math.Tan(epsr / 2)) * 1 / 4, v102.Y - ((tp / 9) / Math.Tan(epsr / 2)) * 3 / 5);
            Vector2 v104 = new Vector2(v60.X - 0.2, v44.Y - 9.6);
            Vector2 v105 = new Vector2(v90.X - ((tp / 9) / Math.Tan(epsr / 2)) * 3 / 2, v90.Y);
            Vector2 v106 = new Vector2(v105.X, v90.Y + tp * 7 / 10);
            Vector2 v107 = new Vector2(v106.X - tp * 3 / 5, v106.Y + ((tp / 9) / Math.Tan(epsr / 2)) * 4 / 5);
            Vector2 v108 = new Vector2(v34.X + tp / 4, v90.Y);
            Vector2 v109 = new Vector2(v106.X - tp / 10, v106.Y - tp / 10);
            Vector2 v110 = new Vector2(v105.X - tp / 10, v105.Y + tp / 10);
            Vector2 v111 = new Vector2(v107.X, v107.Y - tp / 7);
            Vector2 v112 = new Vector2(v108.X + tp / 8, v110.Y);
            Vector2 v114 = new Vector2(v25.X + tp / 12, v25.Y + (tp / 9) / Math.Tan(epsr));
            Vector2 v115 = new Vector2(v33.X - tp / 12, v25.Y + (tp / 9) / Math.Tan(epsr));
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v3 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line4 = { v3, v5 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Vector2[] Line5 = { v6, v5 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v4, v7 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            Vector2[] Line7 = { v5, v7 };
            fun.drawBLine(dxf, Line7, 0.3, contour);
            Vector2[] Line8 = { v1, v4 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            Vector2[] Line9 = { v7, v8 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            Arc1.Vertexes[0].Bulge = -(tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v8));
            Arc2.Vertexes.Add(new LwPolylineVertex(v10));
            Arc2.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            Vector2[] Line10 = { v6, v8 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v9, v10 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v9, v11 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v10, v12 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v11, v12 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            Vector2[] Line15 = { v11, v13 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v12, v14 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v13));
            Arc3.Vertexes.Add(new LwPolylineVertex(v15));
            Arc3.Vertexes[0].Bulge = -(tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc3, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v14));
            Arc4.Vertexes.Add(new LwPolylineVertex(v16));
            Arc4.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Vector2[] Line17 = { v13, v14 };
            fun.drawBLine(dxf, Line17, 0.3, contour);
            Vector2[] Line18 = { v15, v16 };
            fun.drawBLine(dxf, Line18, 0.3, contour);
            Vector2[] Line19 = { v15, v17 };
            fun.drawBLine(dxf, Line19, 0.3, contour);
            Vector2[] Line20 = { v16, v18 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            Vector2[] Line21 = { v17, v18 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            Vector2[] Line22 = { v17, v19 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            Vector2[] Line23 = { v18, v20 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v21));
            Arc5.Vertexes.Add(new LwPolylineVertex(v19));
            Arc5.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v20));
            Arc6.Vertexes.Add(new LwPolylineVertex(v22));
            Arc6.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            Vector2[] Line24 = { v21, v23 };
            fun.drawBLine(dxf, Line24, 0.3, contour);
            Vector2[] Line25 = { v22, v24 };
            fun.drawBLine(dxf, Line25, 0.3, contour);
            Vector2[] Line26 = { v23, v24 };
            fun.drawBLine(dxf, Line26, 0.3, contour);
            Vector2[] Line27 = { v19, v20 };
            fun.drawBLine(dxf, Line27, 0.3, contour);
            Vector2[] Line28 = { v21, v22 };
            fun.drawBLine(dxf, Line28, 0.3, contour);
            Vector2[] Line29 = { v23, v25 };
            fun.drawBLine(dxf, Line29, 0.3, contour);
            Vector2[] Line30 = { v24, v26 };
            fun.drawBLine(dxf, Line30, 0.3, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v25));
            Arc7.Vertexes.Add(new LwPolylineVertex(v27));
            Arc7.Vertexes[0].Bulge = -(tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc7, 0.3, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v26));
            Arc8.Vertexes.Add(new LwPolylineVertex(v28));
            Arc8.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc8, 0.3, contour);
            Vector2[] Line31 = { v25, v26 };
            fun.drawBLine(dxf, Line31, 0.3, contour);
            Vector2[] Line32 = { v27, v28 };
            fun.drawBLine(dxf, Line32, 0.3, contour);
            Vector2[] Line33 = { v27, v29 };
            fun.drawBLine(dxf, Line33, 0.3, contour);
            Vector2[] Line34 = { v30, v28 };
            fun.drawBLine(dxf, Line34, 0.3, contour);
            Vector2[] Line35 = { v29, v30 };
            fun.drawBLine(dxf, Line35, 0.3, contour);
            Vector2[] Line36 = { v29, v31 };
            fun.drawBLine(dxf, Line36, 0.3, contour);
            Vector2[] Line37 = { v30, v32 };
            fun.drawBLine(dxf, Line37, 0.3, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v31));
            Arc9.Vertexes.Add(new LwPolylineVertex(v33));
            Arc9.Vertexes[0].Bulge = -(tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc9, 0.3, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v32));
            Arc10.Vertexes.Add(new LwPolylineVertex(v34));
            Arc10.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc10, 0.3, contour);
            Vector2[] Line38 = { v31, v32 };
            fun.drawBLine(dxf, Line38, 0.3, contour);
            Vector2[] Line39 = { v33, v34 };
            fun.drawBLine(dxf, Line39, 0.3, contour);
            Vector2[] Line40 = { v33, v35 };
            fun.drawBLine(dxf, Line40, 0.3, contour);
            Vector2[] Line41 = { v34, v36 };
            fun.drawBLine(dxf, Line41, 0.3, contour);
            Vector2[] Line42 = { v35, v36 };
            fun.drawBLine(dxf, Line42, 0.3, contour);
            Vector2[] Line43 = { v35, v37 };
            fun.drawBLine(dxf, Line43, 0.3, contour);
            Vector2[] Line44 = { v36, v38 };
            fun.drawBLine(dxf, Line44, 0.3, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v37));
            Arc11.Vertexes.Add(new LwPolylineVertex(v39));
            Arc11.Vertexes[0].Bulge = -(tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc11, 0.3, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v38));
            Arc12.Vertexes.Add(new LwPolylineVertex(v40));
            Arc12.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc12, 0.3, contour);
            Vector2[] Line45 = { v37, v38 };
            fun.drawBLine(dxf, Line45, 0.3, contour);
            Vector2[] Line46 = { v39, v40 };
            fun.drawBLine(dxf, Line46, 0.3, contour);
            Vector2[] Line47 = { v39, v41 };
            fun.drawBLine(dxf, Line47, 0.3, contour);
            Vector2[] Line48 = { v40, v42 };
            fun.drawBLine(dxf, Line48, 0.3, contour);
            Vector2[] Line49 = { v41, v42 };
            fun.drawBLine(dxf, Line49, 0.3, contour);
            Vector2[] Line50 = { v41, v43 };
            fun.drawBLine(dxf, Line50, 0.3, contour);
            Vector2[] Line51 = { v44, v42 };
            fun.drawBLine(dxf, Line51, 0.3, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v43));
            Arc13.Vertexes.Add(new LwPolylineVertex(v45));
            Arc13.Vertexes[0].Bulge = -(tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc13, 0.3, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v44));
            Arc14.Vertexes.Add(new LwPolylineVertex(v46));
            Arc14.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc14, 0.3, contour);
            Vector2[] Line52 = { v43, v44 };
            fun.drawBLine(dxf, Line52, 0.3, contour);
            Vector2[] Line53 = { v45, v46 };
            fun.drawBLine(dxf, Line53, 0.3, contour);
            Vector2[] Line54 = { v45, v47 };
            fun.drawBLine(dxf, Line54, 0.3, contour);
            Vector2[] Line55 = { v46, v48 };
            fun.drawBLine(dxf, Line55, 0.3, contour);
            Vector2[] Line56 = { v47, v48 };
            fun.drawBLine(dxf, Line56, 0.3, contour);
            Vector2[] Line57 = { v47, v49 };
            fun.drawBLine(dxf, Line57, 0.3, contour);
            Vector2[] Line58 = { v48, v50 };
            fun.drawBLine(dxf, Line58, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v49));
            Arc15.Vertexes.Add(new LwPolylineVertex(v51));
            Arc15.Vertexes[0].Bulge = -(tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v50));
            Arc16.Vertexes.Add(new LwPolylineVertex(v52));
            Arc16.Vertexes[0].Bulge = (tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            Vector2[] Line59 = { v49, v50 };
            fun.drawBLine(dxf, Line59, 0.3, contour);
            Vector2[] Line60 = { v51, v52 };
            fun.drawBLine(dxf, Line60, 0.3, contour);
            Vector2[] Line61 = { v51, v53 };
            fun.drawBLine(dxf, Line61, 0.3, contour);
            Vector2[] Line62 = { v52, v54 };
            fun.drawBLine(dxf, Line62, 0.3, contour);
            Vector2[] Line63 = { v53, v54 };
            fun.drawBLine(dxf, Line63, 0.3, contour);
            Vector2[] Line64 = { v53, v55 };
            fun.drawBLine(dxf, Line64, 0.3, contour);
            Vector2[] Line65 = { v56, v54 };
            fun.drawBLine(dxf, Line65, 0.3, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v55));
            Arc17.Vertexes.Add(new LwPolylineVertex(v57));
            Arc17.Vertexes[0].Bulge = -(tp / 9) / Math.Tan(epsr);
            fun.PolyFill(dxf, Arc17, 0.3, contour);
            Vector2[] Line66 = { v56, v58 };
            fun.drawBLine(dxf, Line66, 0.3, contour);
            Vector2[] Line67 = { v55, v56 };
            fun.drawBLine(dxf, Line67, 0.3, contour);
            Vector2[] Line68 = { v57, v58 };
            fun.drawBLine(dxf, Line68, 0.3, contour);
            Vector2[] Line69 = { v57, v59 };
            fun.drawBLine(dxf, Line69, 0.3, contour);
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v60, 0, r1)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v60, Math.PI, r1)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v60, 0, r1)));
            fun.PolyFill(dxf, poly, 0.3, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v60, 0, r2)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v60, Math.PI, r2)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v60, 0, r2)));
            fun.PolyFill(dxf, poly1, 0.1, contour);
            Vector2[] Line70 = { v36, v61 };
            fun.drawBLine(dxf, Line70, 0.3, contour);
            Vector2[] Line71 = { v65, v62 };
            fun.drawBLine(dxf, Line71, 0.3, contour);
            Vector2[] Line72 = { v65, v63 };
            fun.drawBLine(dxf, Line72, 0.3, contour);
            Vector2[] Line73 = { v36, v64 };
            fun.drawBLine(dxf, Line73, 0.3, contour);
            Vector2[] Line74 = { v61, v67 };
            fun.drawBLine(dxf, Line74, 0.3, contour);
            Vector2[] Line75 = { v62, v66 };
            fun.drawBLine(dxf, Line75, 0.3, contour);
            Vector2[] Line76 = { v63, v66 };
            fun.drawBLine(dxf, Line76, 0.3, contour);
            Vector2[] Line77 = { v64, v67 };
            fun.drawBLine(dxf, Line77, 0.3, contour);
            Vector2[] Line78 = { v69, v68 };
            fun.drawBLine(dxf, Line78, 0.3, contour);
            Vector2[] Line79 = { v69, v70 };
            fun.drawBLine(dxf, Line79, 0.3, contour);
            Vector2[] Line80 = { v61, v71 };
            fun.drawBLine(dxf, Line80, 0.3, contour);
            Vector2[] Line81 = { v72, v71 };
            fun.drawBLine(dxf, Line81, 0.3, contour);
            Vector2[] Line82 = { v72, v70 };
            fun.drawBLine(dxf, Line82, 0.15, contour);
            Vector2[] Line83 = { v73, v70 };
            fun.drawBLine(dxf, Line83, 0.15, contour);
            Vector2[] Line84 = { v74, v70 };
            fun.drawBLine(dxf, Line84, 0.3, contour);
            Vector2[] Line85 = { v75, v76 };
            fun.drawBLine(dxf, Line85, 0.15, contour);
            Vector2[] Line86 = { v72, v77 };
            fun.drawBLine(dxf, Line86, 0.3, contour);
            Vector2[] Line87 = { v74, v78 };
            fun.drawBLine(dxf, Line87, 0.3, contour);
            Vector2[] Line88 = { v79, v78 };
            fun.drawBLine(dxf, Line88, 0.3, contour);
            Vector2[] Line89 = { v78, v80 };
            fun.drawBLine(dxf, Line89, 0.3, contour);
            Vector2[] Line90 = { v80, v81 };
            fun.drawBLine(dxf, Line90, 0.3, contour);
            Vector2[] Line91 = { v79, v81 };
            fun.drawBLine(dxf, Line91, 0.3, contour);
            Vector2[] Line92 = { v82, v83 };
            fun.drawBLine(dxf, Line92, 0.3, contour);
            Vector2[] Line93 = { v82, v84 };
            fun.drawBLine(dxf, Line93, 0.3, contour);
            Vector2[] Line94 = { v85, v84 };
            fun.drawBLine(dxf, Line94, 0.3, contour);
            Vector2[] Line95 = { v83, v85 };
            fun.drawBLine(dxf, Line95, 0.3, contour);
            Vector2[] Line96 = { v86, v87 };
            fun.drawBLine(dxf, Line96, 0.05, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v87));
            Arc19.Vertexes.Add(new LwPolylineVertex(v88));
            Arc19.Vertexes[0].Bulge = -((tp / 9) / Math.Tan(epsr / 2)) / 20;
            fun.PolyFill(dxf, Arc19, 0.05, contour);
            Vector2[] Line97 = { v88, v89 };
            fun.drawBLine(dxf, Line97, 0.05, contour);
            Vector2[] Line98 = { v90, v89 };
            fun.drawBLine(dxf, Line98, 0.3, contour);
            Vector2[] Line99 = { v91, v92 };
            fun.drawBLine(dxf, Line99, 0.15, contour);
            Vector2[] Line100 = { v92, v93 };
            fun.drawBLine(dxf, Line100, 0.15, contour);
            Vector2[] Line101 = { v94, v95 };
            fun.drawBLine(dxf, Line101, 0.15, contour);
            Vector2[] Line102 = { v96, v97 };
            fun.drawBLine(dxf, Line102, 0.15, contour);
            Vector2[] Line103 = { v98, v99 };
            fun.drawBLine(dxf, Line103, 0.15, contour);
            Vector2[] Line104 = { v100, v98 };
            fun.drawBLine(dxf, Line104, 0.15, contour);
            Vector2[] Line105 = { v101, v77 };
            fun.drawBLine(dxf, Line105, 0.15, contour);
            Vector2[] Line106 = { v101, v102 };
            fun.drawBLine(dxf, Line106, 0.05, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v102));
            Arc22.Vertexes.Add(new LwPolylineVertex(v103));
            Arc22.Vertexes[0].Bulge = -((tp / 9) / Math.Tan(epsr / 2)) / 5;
            fun.PolyFill(dxf, Arc22, 0.05, contour);
            LwPolyline poly2 = new LwPolyline();
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v104, 0, r3)));
            poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v104, Math.PI, r3)));
            poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v104, 0, r3)));
            fun.PolyFill(dxf, poly2, 0.008, contour);
            Vector2[] Line107 = { v90, v105 };
            fun.drawBLine(dxf, Line107, 0.3, contour);
            Vector2[] Line108 = { v106, v105 };
            fun.drawBLine(dxf, Line108, 0.3, contour);
            Vector2[] Line109 = { v106, v107 };
            fun.drawBLine(dxf, Line109, 0.3, contour);
            Vector2[] Line110 = { v105, v108 };
            fun.drawBLine(dxf, Line110, 0.3, contour);
            Vector2[] Line111 = { v107, v108 };
            fun.drawBLine(dxf, Line111, 0.3, contour);
            Vector2[] Line112 = { v109, v110 };
            fun.drawBLine(dxf, Line112, 0.3, contour);
            Vector2[] Line113 = { v111, v109 };
            fun.drawBLine(dxf, Line113, 0.3, contour);
            Vector2[] Line114 = { v111, v112 };
            fun.drawBLine(dxf, Line114, 0.3, contour);
            Vector2[] Line115 = { v110, v112 };
            fun.drawBLine(dxf, Line115, 0.3, contour);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v2.X - tp, v2.Y - h / 2), new Vector2(v59.X + tp, v2.Y - h / 2) }, 0.15, centre, Linetype.Center);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 7;
            LinearDimension dim1 = new LinearDimension(new Line(v114, v115), -offset * 2, 180, dimensionStyle);
            dim1.UserText = "TP";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v6, v55), -offset * 3, 180, dimensionStyle);
            dim2.UserText = "nTPI";
            dxf.AddEntity(dim2);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureE19(Dictionary<string, Object> data)//ISO 13399-2 图片E.19
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层            
            //作图
            //参数
            double pi = Math.PI;
            double w1 = 10;
            double re = 0.5;
            double cemr = 8;
            double insl = 20;
            double ra = 15 * pi / 180;
            double an = 15 * pi / 180;
            double d1 = 4;
            double s = 3.8;
            double s1 = 4;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(2, v1.Y);
            Vector2 v3 = new Vector2(-2, v2.Y);
            Vector2 v4 = new Vector2(3, v3.Y);
            Vector2 v5 = new Vector2(-3, v4.Y);
            Vector2 v6 = new Vector2(-w1 / 2, v5.Y);
            Vector2 v7 = new Vector2(w1 / 2 - 2.77, 10);
            Vector2 v8 = new Vector2(v7.X + 0.55, v7.Y - 0.14);
            Vector2 v9 = new Vector2(v1.X + w1 / 2, v1.Y);
            Vector2 v10 = new Vector2(-4.5, -10);
            Vector2 v11 = new Vector2(v6.X, v10.Y + re);
            Vector2 v12 = new Vector2(-4, v1.Y);
            Vector2 v13 = new Vector2(v1.X + 1.4, 8.39);
            Vector2 v14 = new Vector2(v13.X + 0.6, 8.2);
            Vector2 v15 = new Vector2(v7.X + 0.06, v7.Y + 0.01);
            Vector2 v16 = new Vector2(v1.X + 4, v1.Y);
            Vector2 v17 = new Vector2(v12.X, -8.50);
            Vector2 v18 = new Vector2(-3.2, -9);
            Vector2 v19 = new Vector2(-4.5, -9.5);
            Vector2 v20 = new Vector2(v1.X, v1.Y + 15);
            Vector2 v21 = new Vector2(v1.X, v20.Y + s1);
            Vector2 v22 = new Vector2(v9.X, 10);
            Vector2 v23 = new Vector2(v20.X - w1 / 2 + s1 * Math.Tan(pi / 12), v20.Y);
            Vector2 v24 = new Vector2(v23.X - s1 * Math.Tan(pi / 12), v23.Y + s1);
            Vector2 v25 = new Vector2(v21.X + w1 / 2, v21.Y);
            Vector2 v26 = new Vector2(v20.X + w1 / 2 - s1 * Math.Tan(pi / 12), v20.Y);
            Vector2 v27 = new Vector2(v20.X - 2, v20.Y);
            Vector2 v28 = new Vector2(v27.X, v27.Y + 2.53);
            Vector2 v29 = new Vector2(v28.X + d1, v28.Y);
            Vector2 v30 = new Vector2(v29.X, v27.Y);
            Vector2 v31 = new Vector2(v28.X - 1, v20.Y + s);
            Vector2 v32 = new Vector2(v31.X + 6, v31.Y);
            Vector2 v33 = new Vector2(v28.X, v28.Y + 0.2);
            Vector2 v34 = new Vector2(v29.X, v29.Y + 0.2);
            Vector2 v35 = new Vector2(v24.X, v20.Y);
            Vector2 v36 = new Vector2(0, 3);
            Vector2 v37 = new Vector2(0, -3);
            Vector2 v38 = new Vector2(v31.X, v31.Y + 0.2);
            Vector2 v39 = new Vector2(v32.X, v32.Y + 0.2);

            // 线段
            //主视图
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = 1;
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v2));
            Arc2.Vertexes.Add(new LwPolylineVertex(v3));
            Arc2.Vertexes[0].Bulge = -1;
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v4));
            Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            Arc3.Vertexes[0].Bulge = 1;
            fun.PolyFill(dxf, Arc3, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v4));
            Arc4.Vertexes.Add(new LwPolylineVertex(v5));
            Arc4.Vertexes[0].Bulge = -1;
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v6));
            Arc5.Vertexes.Add(new LwPolylineVertex(v7));
            Arc5.Vertexes[0].Bulge = -0.33;
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v7));
            Arc6.Vertexes.Add(new LwPolylineVertex(v8));
            Arc6.Vertexes[0].Bulge = -0.35;
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v9));
            Arc7.Vertexes.Add(new LwPolylineVertex(v10));
            Arc7.Vertexes[0].Bulge = -0.45;
            fun.PolyFill(dxf, Arc7, 0.3, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v10));
            Arc8.Vertexes.Add(new LwPolylineVertex(v11));
            Arc8.Vertexes[0].Bulge = -0.395;
            fun.PolyFill(dxf, Arc8, 0.3, contour);
            Vector2[] Line2 = { v6, v11 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v12));
            Arc9.Vertexes.Add(new LwPolylineVertex(v13));
            Arc9.Vertexes[0].Bulge = -0.29;
            fun.PolyFill(dxf, Arc9, 0.3, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v14));
            Arc10.Vertexes.Add(new LwPolylineVertex(v13));
            Arc10.Vertexes[0].Bulge = 0.39;
            fun.PolyFill(dxf, Arc10, 0.3, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v8));
            Arc11.Vertexes.Add(new LwPolylineVertex(v15));
            Arc11.Vertexes[0].Bulge = 0.1033;
            fun.PolyFill(dxf, Arc11, 0.3, contour);
            Vector2[] Line3 = { v7, v15 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            Vector2[] Line5 = { v14, v16 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v12, v17 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v17));
            Arc13.Vertexes.Add(new LwPolylineVertex(v18));
            Arc13.Vertexes[0].Bulge = 0.38;
            fun.PolyFill(dxf, Arc13, 0.3, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v16));
            Arc14.Vertexes.Add(new LwPolylineVertex(v18));
            Arc14.Vertexes[0].Bulge = -0.38;
            fun.PolyFill(dxf, Arc14, 0.3, contour);
            Vector2[] Line7 = { v20, v21 };
            fun.drawPlinetype(dxf, Line7, 0.15, refin, Linetype.Dashed);
            Vector2[] Line8 = { v8, v9 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            Vector2[] Line9 = { v20, v23 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Vector2[] Line10 = { v23, v24 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v24, v21 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            Vector2[] Line12 = { v21, v25 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v25, v26 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v26, v20 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            Vector2[] Line15 = { v27, v28 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v28, v29 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            Vector2[] Line17 = { v29, v30 };
            fun.drawBLine(dxf, Line17, 0.3, contour);
            Vector2[] Line18 = { v31, v32 };
            fun.drawBLine(dxf, Line18, 0.3, contour);
            Vector2[] Line19 = { v33, v28 };
            fun.drawBLine(dxf, Line19, 0.3, contour);
            Vector2[] Line20 = { v34, v29 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v31));
            Arc15.Vertexes.Add(new LwPolylineVertex(v33));
            Arc15.Vertexes[0].Bulge = -0.30;
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v32));
            Arc16.Vertexes.Add(new LwPolylineVertex(v34));
            Arc16.Vertexes[0].Bulge = 0.30;
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            Vector2[] Line21 = { v4, v5 };
            fun.drawPlinetype(dxf, Line21, 0.15, refin, Linetype.Dashed);
            Vector2[] Line22 = { v36, v37 };
            fun.drawPlinetype(dxf, Line22, 0.15, refin, Linetype.Dashed);
            Vector2[] Line23 = { v24, v35 };
            fun.drawBLine(dxf, Line23, 0, skviewdimensioning);
            //标注样式
            //箭头样式
            double offset = 10;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 3;
            //线段尺寸标注
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(v6, v9), 11, 0, dimensionStyle);
            dim1.UserText = "W1 ";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(v10, v7), offset, 90, dimensionStyle);
            dim2.UserText = "INSL  ";
            dxf.AddEntity(dim2);
            //尺寸3
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v9, v22), new Line(v9, v8), offset, dimensionStyle);
            angdim1.UserText = "RA  ";
            dxf.AddEntity(angdim1);
            //尺寸4
            LinearDimension dim3 = new LinearDimension(new Line(v23, v24), 7, 90, dimensionStyle);
            dim3.UserText = "S1";
            dxf.AddEntity(dim3);
            //尺寸5
            LinearDimension dim4 = new LinearDimension(new Line(v32, v20), 7, 270, dimensionStyle);
            dim4.UserText = "S";
            dxf.AddEntity(dim4);
            //尺寸6
            LinearDimension dim5 = new LinearDimension(new Line(v27, v30), 5, 0, dimensionStyle);
            dim5.UserText = "D1";
            dxf.AddEntity(dim5);
            //尺寸7
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v24, v35), new Line(v24, v23), offset - 3, dimensionStyle);
            angdim2.UserText = "AN ";
            dxf.AddEntity(angdim2);
            //尺寸8
            LinearDimension dim6 = new LinearDimension(new Line(v10, v11), offset - 5, 180, dimensionStyle);
            dim6.UserText = "RE";
            dxf.AddEntity(dim6);
            //填充第一区域
            LwPolyline hatchpoly1 = new LwPolyline();
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v24));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v38));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v31));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v33));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v28));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v27));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v23));
            hatchpoly1.IsClosed = true;
            String[] htype1 = new String[100];
            Line[] hline1 = new Line[100];
            int hnumst1 = hatchpoly1.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst1; i++)
            {
                htype1[i] = hatchpoly1.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype1[i] == "Line")
                {
                    hline1[i] = (Line)hatchpoly1.Explode()[i];
                }
            }
            fun.hatchsubofline(dxf, htype1, hnumst1, 45, 5, hline1, hatching);
            //填充第二区域
            LwPolyline hatchpoly2 = new LwPolyline();
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v25));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v39));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v32));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v34));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v29));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v30));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v26));
            hatchpoly2.IsClosed = true;
            String[] htype2 = new String[100];
            Line[] hline2 = new Line[100];
            int hnumst2 = hatchpoly2.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst2; i++)
            {
                htype2[i] = hatchpoly2.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype2[i] == "Line")
                {
                    hline2[i] = (Line)hatchpoly2.Explode()[i];
                }
            }
            fun.hatchsubofline(dxf, htype2, hnumst2, 45, 5, hline2, hatching);


            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);

        }
        public static void FigureE20(Dictionary<string, Object> data)//ISO 13399-2 图片E.20
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层 
            //作图
            //参数
            double pi = Math.PI;
            double bs = 2;
            double bch = 1;
            double kch = 30 * pi / 180;
            double chw = 0.87;
            double re = 1;
            string path = Convert.ToString(data["path"]);
            //坐标
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + bs, v1.Y);
            Vector2 v3 = new Vector2(v2.X + chw, v2.Y + bch * Math.Sin(kch));
            Vector2 v4 = new Vector2(7.37, 9.58 * Math.Sin(kch + pi / 6));
            Vector2 v5 = new Vector2(v4.X - 2 * Math.Sin(pi / 4) * Math.Sin(pi / 12), v4.Y + 2 * Math.Sin(pi / 4) * Math.Cos(pi / 12));
            Vector2 v6 = new Vector2(v5.X - 9.87 * Math.Cos(pi / 6), v5.Y + 9.87 * Math.Sin(pi / 6));
            Vector2 v7 = new Vector2(v6.X - 2 * Math.Sin(pi / 4) * Math.Cos(pi / 12), v6.Y - 2 * Math.Sin(pi / 4) * Math.Sin(pi / 12));
            Vector2 v8 = new Vector2(v7.X - 9.87 * Math.Sin(pi / 6), v7.Y - 9.87 * Math.Cos(pi / 6));
            Vector2 v9 = new Vector2(v1.X - 8.64 * Math.Cos(pi / 6), v1.Y + 8.64 * Math.Sin(pi / 6));
            Vector2 v10 = new Vector2(-5.38, 9.96);
            Vector2 v11 = new Vector2(2.73, 12.13);
            Vector2 v12 = new Vector2(-1.78, 12.73);
            Vector2 v13 = new Vector2(v1.X - 0.24, 1.06);
            Vector2 v14 = new Vector2(v13.X, 12.93);
            Vector2 v15 = new Vector2(4.9, 4.02);
            Vector2 v16 = new Vector2(v1.X - 3.21, v1.Y + 1.85);
            Vector2 v17 = new Vector2(v1.X - 6.18, 6.99);
            Vector2 v18 = new Vector2(5.7, v17.Y);
            Vector2 v19 = new Vector2(v1.X + 4.9, v1.Y + 1.67);
            Vector2 v20 = new Vector2(16.3, 6.99);
            Vector2 v21 = new Vector2(v20.X + 7.43, v20.Y);
            Vector2 v22 = new Vector2(v20.X + 3.715, 10.707);
            Vector2 v23 = new Vector2(v22.X, v22.Y - 7.43);
            Vector2 v24 = new Vector2(14.08, 7.85);
            Vector2 v25 = new Vector2(v24.X, v24.Y - 2 * re * Math.Cos(pi / 6));
            Vector2 v26 = new Vector2(v24.X + 9.406 * Math.Cos(pi / 6), v24.Y + 9.406 * Math.Sin(pi / 6));
            Vector2 v27 = new Vector2(v26.X, v26.Y - 11.14);
            Vector2 v28 = new Vector2(23.73, 11.69);
            Vector2 v29 = new Vector2(v28.X, v28.Y - 9.41);
            Vector2 v30 = new Vector2(22.73, 2.289);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v2, v3 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes[0].Bulge = 0.29;
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line4 = { v5, v6 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v6));
            Arc2.Vertexes.Add(new LwPolylineVertex(v7));
            Arc2.Vertexes[0].Bulge = 0.29;
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            Vector2[] Line5 = { v7, v8 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v9, v1 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v8));
            Arc3.Vertexes.Add(new LwPolylineVertex(v9));
            Arc3.Vertexes[0].Bulge = 0.29;
            fun.PolyFill(dxf, Arc3, 0.3, contour);

            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v10));
            Arc4.Vertexes.Add(new LwPolylineVertex(v11));
            Arc4.Vertexes[0].Bulge = -(chw - 0.47);
            fun.PolyFillandlinetype(dxf, Arc4, 0, centre, Linetype.Dashed);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v15));
            Arc5.Vertexes.Add(new LwPolylineVertex(v11));
            Arc5.Vertexes[0].Bulge = (chw - 0.47);
            fun.PolyFillandlinetype(dxf, Arc5, 0, centre, Linetype.Dashed);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v15));
            Arc6.Vertexes.Add(new LwPolylineVertex(v16));
            Arc6.Vertexes[0].Bulge = -(chw - 0.47);
            fun.PolyFillandlinetype(dxf, Arc6, 0, centre, Linetype.Dashed);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v10));
            Arc7.Vertexes.Add(new LwPolylineVertex(v16));
            Arc7.Vertexes[0].Bulge = (chw - 0.47);
            fun.PolyFillandlinetype(dxf, Arc7, 0, centre, Linetype.Dashed);
            Vector2[] Line7 = { v14, v13 };
            fun.drawPlinetype(dxf, Line7, 0.15, centre, Linetype.Dashed);
            Vector2[] Line8 = { v17, v18 };
            fun.drawPlinetype(dxf, Line8, 0.15, centre, Linetype.Dashed);
            Vector2[] Line9 = { v3, v19 };
            fun.drawBLine(dxf, Line9, 0,  skviewdimensioning);
            Vector2[] Line10 = { v20, v21 };
            fun.drawPlinetype(dxf, Line10, 0.15, centre, Linetype.Dashed);
            Vector2[] Line11 = { v22, v23 };
            fun.drawPlinetype(dxf, Line11, 0.15, centre, Linetype.Dashed);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v24));
            Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            Arc8.Vertexes[0].Bulge = 0.5;
            fun.PolyFill(dxf, Arc8, 0.3, contour);
            Vector2[] Line12 = { v24, v26 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v25, v27 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            Vector2[] Line14 = { v28, v29 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v26));
            Arc9.Vertexes.Add(new LwPolylineVertex(v28));
            Arc9.Vertexes[0].Bulge = -0.5;
            fun.PolyFill(dxf, Arc9, 0.3, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v27));
            Arc10.Vertexes.Add(new LwPolylineVertex(v29));
            Arc10.Vertexes[0].Bulge = 0.5;
            fun.PolyFill(dxf, Arc10, 0.3, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v20));
            Arc11.Vertexes.Add(new LwPolylineVertex(v22));
            Arc11.Vertexes[0].Bulge = -0.42;
            fun.PolyFillandlinetype(dxf, Arc11, 0, centre, Linetype.Dashed);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v21));
            Arc12.Vertexes.Add(new LwPolylineVertex(v22));
            Arc12.Vertexes[0].Bulge = 0.42;
            fun.PolyFillandlinetype(dxf, Arc12, 0, centre, Linetype.Dashed);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v21));
            Arc13.Vertexes.Add(new LwPolylineVertex(v23));
            Arc13.Vertexes[0].Bulge = -0.42;
            fun.PolyFillandlinetype(dxf, Arc13, 0, centre, Linetype.Dashed);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v20));
            Arc14.Vertexes.Add(new LwPolylineVertex(v23));
            Arc14.Vertexes[0].Bulge = 0.42;
            fun.PolyFillandlinetype(dxf, Arc14, 0, centre, Linetype.Dashed);
            Vector2[] Line15 = { v29, v30 };
            fun.drawBLine(dxf, Line15, 0, skviewdimensioning);

            //标注样式
            //箭头样式
            double offset = 3;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 10;
            //线段尺寸标注
            //尺寸1
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 180, dimensionStyle);
            dim1.UserText = "BS";
            dxf.AddEntity(dim1);
            //尺寸2
            LinearDimension dim2 = new LinearDimension(new Line(v2, v3), offset, 210, dimensionStyle);
            dim2.UserText = "BCH";
            dxf.AddEntity(dim2);
            //尺寸3
            LinearDimension dim3 = new LinearDimension(new Line(v2, v3), offset + 3, 180, dimensionStyle);
            dim3.UserText = "CHW";
            dxf.AddEntity(dim3);
            //尺寸4
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v3, v19), new Line(v3, v4), offset, dimensionStyle);
            angdim1.UserText = "KCH";
            dxf.AddEntity(angdim1);
            //尺寸5
            LinearDimension dim4 = new LinearDimension(new Line(v29, v30), offset + 5, 180, dimensionStyle);
            dim4.UserText = "RE";
            dxf.AddEntity(dim4);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);

        }
        public static void FigureE21(Dictionary<string, Object> data)//ISO 13399-2 图片E.21
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //作图
                                                                           //参数
            double pi = Math.PI;
            double wf = 6;
            double ek = 50 * pi / 180;
            double nf = 46 * pi / 180;
            double lf = 24;
            double fn = 38 * pi / 180;
            double f = 1;
            double yu = 60 * pi / 180;
            double baws = 53 * pi / 180;
            double cw = 3.2;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + wf, v1.Y);
            Vector2 v3 = new Vector2(v1.X - wf / 3, v1.Y - Math.Tan(ek) * wf / 3);
            Vector2 v4 = new Vector2(v2.X + wf * 8 / 5, v2.Y - Math.Tan(nf) * (wf * 8 / 5));
            Vector2 v5 = new Vector2(v3.X + Math.Tan(nf) * lf / 3, v3.Y - lf * 2 / 5);
            Vector2 v6 = new Vector2(v3.X - ((1 / 2 / Math.Tan(fn * 2)) * 2), v3.Y - 0.6);
            Vector2 v7 = new Vector2(v5.X - Math.Tan(nf) * (wf / 4), v5.Y + wf / 4);
            Vector2 v8 = new Vector2(v7.X - (((2 / Math.Tan(fn * 2))) * 7 / 10), v7.Y + 0.05);
            Vector2 v9 = new Vector2(v1.X + wf * 2 / 3, v1.Y);
            Vector2 v10 = new Vector2(v3.X + (lf * 1 / 10) / (Math.Tan(ek)), v3.Y - lf * 1 / 11);
            Vector2 v11 = new Vector2(v10.X + (lf * 1 / 20) / (Math.Tan(ek)), v10.Y - lf * 1 / 21);
            Vector2 v12 = new Vector2(v9.X + wf / 7 - wf / 20, v9.Y - Math.Tan(ek) * wf / 4);
            Vector2 v13 = new Vector2(v6.X + (lf * 1 / 14) / (Math.Tan(ek)), v6.Y - lf * 1 / 14);
            Vector2 v14 = new Vector2(v13.X - ((lf * 1 / 11) / (Math.Tan(ek)) / 2), v13.Y - Math.Tan(ek) * ((lf * 1 / 12) / (Math.Tan(ek)) / 2));
            Vector2 v15 = new Vector2(v6.X + ((lf * 1 / 14) / (Math.Tan(ek))) * 2, v6.Y - lf * 1 / 7);
            Vector2 v16 = new Vector2(v15.X - ((lf * 1 / 11) / (Math.Tan(ek)) / 2), v15.Y - Math.Tan(ek) * ((lf * 1 / 12) / (Math.Tan(ek)) / 2));
            Vector2 v17 = new Vector2(v6.X + f * 3 / 10, v14.Y + Math.Tan(ek) * ((lf * 1 / 12) / (Math.Tan(ek)) / 2) / 4);
            Vector2 v18 = new Vector2(v1.X + f / 6, v16.Y - Math.Tan(ek) * ((lf * 1 / 13) / (Math.Tan(ek)) / 2) / 4);
            Vector2 v19 = new Vector2(v6.X - ((lf * 1 / 14) / (Math.Tan(ek))) * 2 / 5, v15.Y + Math.Tan(ek) * ((lf * 1 / 12) / (Math.Tan(ek)) / 2) * 1 / 36);
            Vector2 v20 = new Vector2(v18.X - ((lf * 1 / 11) / (Math.Tan(ek)) / 2), v18.Y - Math.Tan(ek) * ((lf * 1 / 12) / (Math.Tan(ek) * 2)));
            Vector2 v21 = new Vector2(v6.X - ((lf * 1 / 7) / (Math.Tan(ek))) * 1 / 5, v15.Y - Math.Tan(ek) * ((lf * 1 / 11) / (Math.Tan(ek)) / 2) * 1 / 2);
            Vector2 v22 = new Vector2(v18.X - ((lf * 1 / 7) / (Math.Tan(ek / 2))) * 1 / 5, v18.Y - Math.Tan(ek) * ((lf * 5 / 34) / (Math.Tan(ek) * 2)) * 1 / 2);
            Vector2 v23 = new Vector2(v4.X - (wf / 3) / Math.Tan(nf), v4.Y + wf / 3);
            Vector2 v24 = new Vector2(v23.X - wf / 4, v23.Y - Math.Tan(fn / 2) * wf / 4);
            Vector2 v25 = new Vector2(v12.X + wf * 2 / 3 + f * 2, v12.Y - (wf + f / 2) / Math.Tan(nf));
            Vector2 v26 = new Vector2(v4.X, v4.Y - lf / 4 - f);
            Vector2 v27 = new Vector2(v26.X - wf / 2, v26.Y + Math.Tan(fn) * wf / 4);
            Vector2 v28 = new Vector2(v5.X - f / 3, v5.Y - Math.Tan(nf) * f / 3);
            Vector2 v29 = new Vector2(v28.X - f / 8, v28.Y - f / 3);
            Vector2 v30 = new Vector2(v29.X - (lf / 6) / Math.Tan(nf) + f, v29.Y - lf / 8);
            Vector2 v31 = new Vector2(v30.X, v30.Y - f - f / 3);
            Vector2 v32 = new Vector2(v27.X - wf - f, v27.Y - Math.Tan(fn / 2) * wf / 6);
            Vector2 v33 = new Vector2(v25.X, v25.Y - lf / 4 - f * 8 / 5);
            Vector2 v34 = new Vector2(v26.X, v26.Y + f / 2);
            Vector2 v35 = new Vector2(v32.X - wf / 3, v26.Y);
            Vector2 v36 = new Vector2(v32.X, v32.Y + wf / 3 + f);
            Vector2 v37 = new Vector2(v26.X - f / 2, v26.Y + f * 3 / 5);
            Vector2 v38 = new Vector2(v4.X - f / 2, v4.Y + f / 2);
            Vector2 v39 = new Vector2(v26.X, v26.Y + f / 3);
            Vector2 v40 = new Vector2(v39.X - wf * 2 + f, v39.Y);
            Vector2 v41 = new Vector2(v26.X, v26.Y - lf / 6);
            Vector2 v42 = new Vector2(v31.X, v31.Y - lf / 6);
            Vector2 v43 = new Vector2(v31.X, v31.Y - lf / 12 + f / 3);
            Vector2 v44 = new Vector2(v42.X, v42.Y + lf / 12 - f / 3);
            Vector2 v45 = new Vector2(v44.X + wf * 2 / 3, v44.Y);
            Vector2 v46 = new Vector2(v43.X + wf * 2 / 3, v43.Y);
            Vector2 v47 = new Vector2(v26.X - f / 2, v26.Y - lf / 12 + f / 3);
            Vector2 v48 = new Vector2(v41.X - f / 2, v41.Y + lf / 12 - f / 3);
            Vector2 v49 = new Vector2(v48.X - wf * 2 / 3, v48.Y);
            Vector2 v50 = new Vector2(v47.X - wf * 2 / 3, v47.Y);
            Vector2 v51 = new Vector2(v41.X - wf / 4, v41.Y);
            Vector2 v52 = new Vector2(v42.X + wf / 4, v42.Y);
            Vector2 v53 = new Vector2(v41.X - wf / 4, v41.Y - f);
            Vector2 v54 = new Vector2(v42.X + wf / 4, v42.Y - f);
            Vector2 v55 = new Vector2(v41.X - wf / 4 + f / 5, v41.Y - f);
            Vector2 v56 = new Vector2(v42.X + wf / 4 - f / 5, v42.Y - f);
            Vector2 v57 = new Vector2(v42.X + wf / 4, v54.Y - lf / 3);
            Vector2 v58 = new Vector2(v41.X - wf / 4, v53.Y - lf / 3);
            Vector2 v59 = new Vector2(v57.X + ((f / 2) / Math.Tan(nf)), v57.Y - f / 2);
            Vector2 v60 = new Vector2(v58.X - ((f / 2) / Math.Tan(nf)), v58.Y - f / 2);
            Vector2 v61 = new Vector2(v41.X - wf - f * 2 / 3, v41.Y);
            Vector2 v62 = new Vector2(v3.X + Math.Tan(nf) * lf / 6, v3.Y - lf / 5);
            Vector2 v63 = new Vector2(v6.X + (lf * 1 / 14) / (Math.Tan(ek)) * 3, v6.Y - lf * 3 / 14);
            Vector2 v64 = new Vector2(v63.X - ((lf * 1 / 11) / (Math.Tan(ek)) / 2), v63.Y - Math.Tan(ek) * ((lf * 1 / 12) / (Math.Tan(ek)) / 2));
            Vector2 v65 = new Vector2(v6.X + ((lf * 1 / 14) / (Math.Tan(ek))) * 4, v6.Y - lf * 2 / 7);
            Vector2 v66 = new Vector2(v65.X - ((lf * 1 / 11) / (Math.Tan(ek)) / 2), v65.Y - Math.Tan(ek) * ((lf * 1 / 12) / (Math.Tan(ek)) / 2));
            Vector2 v67 = new Vector2(v64.X - f / 4, v64.Y + Math.Tan(nf) * f / 4);
            Vector2 v68 = new Vector2(v66.X + f / 4, v66.Y - Math.Tan(nf) * f / 4);
            Vector2 v69 = new Vector2(v6.X + ((lf * 1 / 14) / (Math.Tan(ek))) * 8 / 5, v65.Y + Math.Tan(ek / 2) * ((lf * 1 / 12) / (Math.Tan(ek)) / 2) * 1 / 30);
            Vector2 v70 = new Vector2(v68.X - ((lf * 1 / 11) / (Math.Tan(ek)) * 4 / 10), v68.Y - Math.Tan(ek) * ((lf * 1 / 12) / (Math.Tan(ek))) * 4 / 10);
            Vector2 v71 = new Vector2(v6.X + ((lf * 1 / 7) / (Math.Tan(ek))) - f / 2, v65.Y - Math.Tan(ek) * ((lf * 1 / 11) / (Math.Tan(ek)) / 2) * 1 / 3);
            Vector2 v72 = new Vector2(v68.X - ((lf * 1 / 7) / (Math.Tan(ek / 2))) * 1 / 5 + f / 4, v68.Y - Math.Tan(ek) * ((lf * 5 / 34) / (Math.Tan(ek) * 2)) / 2);
            //2
            Vector2 v73 = new Vector2(v1.X + 40, v1.Y - 10);
            Vector2 v74 = new Vector2(v73.X + wf, v73.Y - Math.Tan(fn) * wf);
            Vector2 v75 = new Vector2(v73.X - wf * 6 / 5, v73.Y - (wf * 6 / 5) / (Math.Tan(fn)));
            Vector2 v76 = new Vector2(v75.X - wf + f * 2, v75.Y - wf / 3 / Math.Tan(fn));
            Vector2 v77 = new Vector2(v76.X - f, v76.Y);
            Vector2 v78 = new Vector2(v77.X, v76.Y - f * 2);
            Vector2 v79 = new Vector2(v77.X + lf * 2 / 3, v78.Y);
            Vector2 v80 = new Vector2(v79.X, v79.Y + wf * 2 / 3);
            Vector2 v81 = new Vector2(v80.X - wf * 4 / 7, v80.Y);
            Vector2 v82 = new Vector2(v74.X - wf * 4 / 7, v73.Y - ((wf * 6 / 5) / (Math.Tan(fn))) * 3 / 4);
            Vector2 v83 = new Vector2(v81.X, v81.Y - f * 2 / 3);
            Vector2 v84 = new Vector2(v75.X + f / 4, v75.Y + f / 4);
            Vector2 v85 = new Vector2(v81.X, v81.Y - f * 2 / 3 + f / 6);
            Vector2 v86 = new Vector2(v73.X - wf * 2 / 5, v73.Y - ((wf * 6 / 5) / (Math.Tan(fn))) * 1 / 3);
            Vector2 v87 = new Vector2(v78.X + f * 4 + f / 2, v78.Y);
            Vector2 v88 = new Vector2(v79.X - f * 4 + f / 3, v79.Y);
            Vector2 v89 = new Vector2(v78.X + f * 4 + f / 2, v78.Y - f / 2);
            Vector2 v90 = new Vector2(v79.X - f * 4 + f / 3, v79.Y - f / 2);
            Vector2 v91 = new Vector2(v78.X + f * 4 - f / 6 + f / 2, v78.Y - f / 2);
            Vector2 v92 = new Vector2(v79.X - f * 4 + f / 6 + f / 3, v79.Y - f / 2);
            Vector2 v93 = new Vector2(v92.X, v92.Y - wf);
            Vector2 v94 = new Vector2(v91.X, v91.Y - wf);
            Vector2 v95 = new Vector2(v94.X + f / 3, v94.Y - f / 2);
            Vector2 v96 = new Vector2(v93.X - f / 3, v93.Y - f / 2);
            Vector2 v97 = new Vector2(v75.X + wf * 3 / 10 + wf / 2 + f * 2 / 5, v82.Y);
            Vector2 v98 = new Vector2(v97.X, v97.Y + f);
            Vector2 v99 = new Vector2(v97.X - f * 4 / 5, v98.Y - ((f * 4 / 5) / Math.Tan(yu)));
            Vector2 v100 = new Vector2(v97.X + f * 4 / 5, v98.Y - ((f * 4 / 5) / Math.Tan(yu)));
            Vector2 v101 = new Vector2(v97.X, v97.Y - f);
            Vector2 v102 = new Vector2(v97.X - f * 4 / 5, v101.Y + ((f * 4 / 5) / Math.Tan(yu)));
            Vector2 v103 = new Vector2(v97.X + f * 4 / 5, v101.Y + ((f * 4 / 5) / Math.Tan(yu)));
            Vector2 v104 = new Vector2(v73.X - f / 2, v73.Y);
            Vector2 v105 = new Vector2(v84.X + f / 6, v84.Y + f / 3);
            Vector2 v106 = new Vector2(v105.X - f / 8, v105.Y + f * 2 / 5);
            Vector2 v107 = new Vector2(v77.X + lf / 3, v78.Y);
            Vector2 v108 = new Vector2(v77.X + lf / 3, v78.Y + f / 2);
            Vector2 v109 = new Vector2(v107.X + f * 2 / 5, v107.Y);
            Vector2 v110 = new Vector2(v107.X - f * 2 / 5, v107.Y);
            Vector2 v111 = new Vector2(v107.X, v107.Y + f * 2 / 5);
            Vector2 v112 = new Vector2(v107.X, v107.Y - f * 2 / 5);
            Vector2 v113 = new Vector2(v73.X - wf * 3 / 5 - f / 7, v73.Y - (wf * 3 / 5) / (Math.Tan(fn)) + f / 3);
            Vector2 v114 = new Vector2(v73.X - wf * 5 / 25 - f / 2, v73.Y - (wf * 5 / 25) / (Math.Tan(fn)));
            Vector2 v115 = new Vector2(v73.X - wf * 9.3 / 25 - f / 2, v73.Y - (wf * 9.3 / 25) / (Math.Tan(fn)));
            Vector2 v116 = new Vector2(v114.X - f, v114.Y + f * 4 / 5);
            Vector2 v117 = new Vector2(v114.X - f * 2, v115.Y + f * 4 / 5);
            Vector2 v118 = new Vector2(v117.X - f * 3 / 10, v117.Y - f * 3.3 / 8);
            Vector2 v119 = new Vector2(v116.X + f * 3 / 10, v116.Y + f * 3.1 / 8);
            Vector2 v120 = new Vector2(v118.X - f * 12 / 10, v118.Y + f * 21 / 20);
            Vector2 v121 = new Vector2(v119.X - f * 12 / 10, v119.Y + f * 21 / 20);
            Vector2 v122 = new Vector2(v73.X - wf * 3.6 / 5 - f / 2, v73.Y - (wf * 3.6 / 5) / (Math.Tan(fn)));
            Vector2 v123 = new Vector2(v73.X - wf * 4.47 / 5 - f / 2, v73.Y - (wf * 4.47 / 5) / (Math.Tan(fn)));
            Vector2 v124 = new Vector2(v122.X - f, v122.Y + f * 4 / 5);
            Vector2 v125 = new Vector2(v123.X - f, v123.Y + f * 4 / 5);
            Vector2 v126 = new Vector2(v125.X - f * 3 / 10, v125.Y - f * 3.3 / 8);
            Vector2 v127 = new Vector2(v124.X + f * 3 / 10, v124.Y + f * 3.1 / 8);
            Vector2 v128 = new Vector2(v126.X - f * 12 / 10, v126.Y + f * 21 / 20);
            Vector2 v129 = new Vector2(v127.X - f * 12 / 10, v127.Y + f * 21 / 20);
            Vector2 v130 = new Vector2(v113.X - wf * 4 / 5, v113.Y + wf * 4 / 5);
            Vector2 v131 = new Vector2(v108.X, v108.Y + wf * 5 / 2);
            //3
            Vector2 v132 = new Vector2(v96.X + lf * 2 / 3 + wf * 3 / 2, v96.Y);
            Vector2 v133 = new Vector2(v132.X + wf, v132.Y);
            Vector2 v134 = new Vector2(v132.X + wf, v132.Y + lf * 5 / 6);
            Vector2 v135 = new Vector2(v132.X, v132.Y + lf * 5 / 6);
            Vector2 v136 = new Vector2(v134.X, v134.Y + f * 3 / 5);
            Vector2 v137 = new Vector2(v135.X, v135.Y + f * 3 / 5);
            Vector2 v138 = new Vector2(v136.X, v136.Y + f * 2);
            Vector2 v139 = new Vector2(v138.X - f * 2, v138.Y + f * 7 / 5 + f / 2);
            Vector2 v140 = new Vector2(v139.X - wf * 6 / 5, v139.Y + f * 8 / 5);
            Vector2 v141 = new Vector2(v135.X, v135.Y + f * 3.2 + f / 6 + f / 2);
            Vector2 v142 = new Vector2(v141.X - f / 4, v135.Y + f * 3.2 + f / 6 + f / 2 + f / 4);
            Vector2 v143 = new Vector2(v142.X - f * 7 / 2, v142.Y + f * 4 / 5);
            Vector2 v144 = new Vector2(v143.X - f / 2, v143.Y + f / 20);
            Vector2 v145 = new Vector2(v140.X - f / 2, v140.Y + f / 3.5);
            Vector2 v146 = new Vector2(v143.X + f / 2 - f / 5, v143.Y - f / 14);
            Vector2 v147 = new Vector2(v140.X + f / 6, v140.Y - f / 16);
            Vector2 v148 = new Vector2(v141.X, v141.Y - f * 4 / 5);
            Vector2 v149 = new Vector2(v141.X + f * 3 / 5, v141.Y + f * 7 / 5);
            Vector2 v150 = new Vector2(v141.X + f * 7 / 5, v141.Y - f * 11 / 10);
            Vector2 v151 = new Vector2(v150.X, v150.Y + f * 5 / 12);
            Vector2 v152 = new Vector2(v151.X + f * 3 / 10, v151.Y + f * 2 / 25);
            Vector2 v153 = new Vector2(v152.X + f * 1 / 25, v152.Y - f * 3 / 10);
            Vector2 v154 = new Vector2(v153.X + f * 1 / 5, v153.Y - f * 3 / 25);
            Vector2 v155 = new Vector2(v154.X - f * 2.3 / 10, v154.Y - f * 1.3 / 5);
            Vector2 v156 = new Vector2(v155.X + f * 3 / 100, v155.Y - f * 2.8 / 10);
            Vector2 v157 = new Vector2(v156.X - f * 6 / 20, v156.Y + f * 3 / 25);
            Vector2 v158 = new Vector2(v157.X - f * 2.6 / 10, v157.Y - f * 4 / 25);
            Vector2 v159 = new Vector2(v158.X - f * 1 / 25, v158.Y + f * 2.8 / 10);
            Vector2 v160 = new Vector2(v159.X - f * 3 / 10, v159.Y + f * 13 / 100);
            Vector2 v161 = new Vector2(v160.X + f * 5 / 25, v160.Y + f / 6);
            Vector2 v162 = new Vector2(v150.X - f * 1.3 / 25, v150.Y + f * 3.8 / 12);
            Vector2 v163 = new Vector2(v161.X - f * 1 / 50, v161.Y + f * 3.3 / 10);
            Vector2 v164 = new Vector2(v138.X, v138.Y + wf * 1.5);
            Vector2 v165 = new Vector2(v132.X - wf, v132.Y);
            //4
            Vector2 v166 = new Vector2(v132.X + lf, v132.Y + lf * 7 / 10);
            Vector2 v167 = new Vector2(v166.X + Math.Sin(baws) * cw, v166.Y - Math.Cos(baws) * cw);
            Vector2 v168 = new Vector2(v167.X + cw * 6 / 5, v167.Y + (Math.Tan(baws)) * (cw * 6 / 5));
            Vector2 v169 = new Vector2(v166.X + cw * 8 / 5, v166.Y + (Math.Tan(baws)) * cw * 8 / 5);
            Vector2 v170 = new Vector2(v168.X + cw * 4, v168.Y);
            Vector2 v171 = new Vector2(v169.X + cw * 4 + cw * 2 / 5, v169.Y);
            Vector2 v172 = new Vector2(v171.X + f / 4, v171.Y - f / 4);
            Vector2 v173 = new Vector2(v170.X + f / 4, v170.Y + f / 4);
            //
            Vector2 v174 = new Vector2(v169.X + cw, v169.Y);
            Vector2 v175 = new Vector2(v174.X, v168.Y);
            //
            Vector2 v176 = new Vector2(v171.X - cw * 2.5 / 3, v171.Y);
            Vector2 v177 = new Vector2(v170.X - cw * 2.5 / 3, v170.Y);
            //
            Vector2 v178 = new Vector2(v174.X + cw * 1.4 / 3, v171.Y);
            Vector2 v179 = new Vector2(v177.X - cw * 1.4 / 3, v171.Y);
            Vector2 v180 = new Vector2(v174.X + cw * 1.4 / 3, v171.Y - f / 4);
            Vector2 v181 = new Vector2(v177.X - cw * 1.4 / 3, v171.Y - f / 4);
            //
            Vector2 v182 = new Vector2(v175.X + cw * 1.4 / 3, v170.Y);
            Vector2 v183 = new Vector2(v177.X - cw * 1.4 / 3, v170.Y);
            Vector2 v184 = new Vector2(v175.X + cw * 1.4 / 3, v170.Y + f / 4);
            Vector2 v185 = new Vector2(v177.X - cw * 1.4 / 3, v170.Y + f / 4);
            //
            Vector2 v186 = new Vector2(v180.X - f * 1.4 / 5, v180.Y - (f * 3.4 / 5) / Math.Tan(pi / 2 - baws));
            Vector2 v187 = new Vector2(v181.X + f * 1.4 / 5, v181.Y - (f * 3.4 / 5) / Math.Tan(pi / 2 - baws));
            Vector2 v188 = new Vector2(v184.X - f * 1.4 / 5, v184.Y + (f * 3.4 / 5) / Math.Tan(pi / 2 - baws));
            Vector2 v189 = new Vector2(v185.X + f * 1.4 / 5, v185.Y + (f * 3.4 / 5) / Math.Tan(pi / 2 - baws));
            Vector2 v190 = new Vector2(v186.X - f / 4, v186.Y);
            Vector2 v191 = new Vector2(v187.X + f / 4, v187.Y);
            Vector2 v192 = new Vector2(v188.X - f / 4, v188.Y);
            Vector2 v193 = new Vector2(v189.X + f / 4, v189.Y);
            Vector2 v194 = new Vector2(v174.X, v174.Y - cw / 2 - f / 8);
            Vector2 v195 = new Vector2(v174.X, v174.Y - cw / 2 - f / 4);
            Vector2 v196 = new Vector2(v176.X, v176.Y - cw / 2 - f / 8);
            Vector2 v197 = new Vector2(v176.X, v176.Y - cw / 2 - f / 4);
            Vector2 v198 = new Vector2(v169.X - f * 8, v169.Y);
            //
            Vector2 v199 = new Vector2(v190.X - f / 2, v190.Y - f / 4);
            Vector2 v200 = new Vector2(v191.X + f / 2, v190.Y - f / 4);
            Vector2 v201 = new Vector2(v199.X - f / 2, v199.Y - f / 4);
            Vector2 v202 = new Vector2(v200.X + f / 2, v200.Y - f / 4);
            Vector2 v203 = new Vector2(v201.X + f / 4, v201.Y - f / 4);
            Vector2 v204 = new Vector2(v202.X - f / 4, v202.Y - f / 4);
            Vector2 v205 = new Vector2(v203.X + f / 4, v203.Y - f / 4);
            Vector2 v206 = new Vector2(v204.X - f / 4, v204.Y - f / 4);
            //
            Vector2 v207 = new Vector2(v79.X + lf * 1 / 3 + wf / 10, v79.Y);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.15, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.15, contour);
            Vector2[] Line3 = { v2, v4 };
            fun.drawBLine(dxf, Line3, 0.15, contour);
            Vector2[] Line4 = { v3, v5 };
            fun.drawBLine(dxf, Line4, 0.15, contour);
            Vector2[] Line5 = { v8, v7 };
            fun.drawBLine(dxf, Line5, 0.15, contour);
            Vector2[] Line6 = { v3, v6 };
            fun.drawBLine(dxf, Line6, 0.15, contour);
            Vector2[] Line7 = { v6, v8 };
            fun.drawBLine(dxf, Line7, 0.15, contour);
            Vector2[] Line8 = { v9, v10 };
            fun.drawBLine(dxf, Line8, 0.15, contour);
            Vector2[] Line9 = { v11, v12 };
            fun.drawBLine(dxf, Line9, 0.15, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            Arc1.Vertexes.Add(new LwPolylineVertex(v12));
            Arc1.Vertexes[0].Bulge = Math.Tan(nf / 2) * (Math.Sin(ek) * wf / 7);
            fun.PolyFill(dxf, Arc1, 0.15, contour);
            Vector2[] Line10 = { v13, v14 };
            fun.drawBLine(dxf, Line10, 0.15, contour);
            Vector2[] Line11 = { v15, v16 };
            fun.drawBLine(dxf, Line11, 0.15, contour);
            Vector2[] Line12 = { v14, v16 };
            fun.drawBLine(dxf, Line12, 0.15, contour);
            Vector2[] Line13 = { v14, v17 };
            fun.drawBLine(dxf, Line13, 0.15, contour);
            Vector2[] Line14 = { v16, v18 };
            fun.drawBLine(dxf, Line14, 0.15, contour);
            Vector2[] Line15 = { v19, v17 };
            fun.drawBLine(dxf, Line15, 0.15, contour);
            Vector2[] Line16 = { v20, v18 };
            fun.drawBLine(dxf, Line16, 0.15, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v19));
            Arc2.Vertexes.Add(new LwPolylineVertex(v21));
            Arc2.Vertexes[0].Bulge = ((lf * 1 / 12) / (Math.Tan(ek))) * 1 / 5 * Math.Tan(ek);
            fun.PolyFill(dxf, Arc2, 0.15, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v20));
            Arc3.Vertexes.Add(new LwPolylineVertex(v22));
            Arc3.Vertexes[0].Bulge = -((lf / 5) / (Math.Tan(ek))) * 0.21 * Math.Tan(ek / 2);
            fun.PolyFill(dxf, Arc3, 0.15, contour);
            Vector2[] Line17 = { v21, v22 };
            fun.drawBLine(dxf, Line17, 0.15, contour);
            Vector2[] Line18 = { v23, v24 };
            fun.drawBLine(dxf, Line18, 0.15, contour);
            Vector2[] Line19 = { v12, v25 };
            fun.drawBLine(dxf, Line19, 0.15, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v24));
            Arc4.Vertexes.Add(new LwPolylineVertex(v25));
            Arc4.Vertexes[0].Bulge = -Math.Tan(nf / 2) * (Math.Sin(ek) * wf / 7);
            fun.PolyFill(dxf, Arc4, 0.15, contour);
            Vector2[] Line20 = { v4, v26 };
            fun.drawBLine(dxf, Line20, 0.15, contour);
            Vector2[] Line21 = { v27, v34 };
            fun.drawBLine(dxf, Line21, 0.15, contour);
            Vector2[] Line22 = { v5, v28 };
            fun.drawBLine(dxf, Line22, 0.15, contour);
            Vector2[] Line23 = { v29, v28 };
            fun.drawBLine(dxf, Line23, 0.15, contour);
            Vector2[] Line24 = { v29, v30 };
            fun.drawBLine(dxf, Line24, 0.15, contour);
            Vector2[] Line25 = { v31, v30 };
            fun.drawBLine(dxf, Line25, 0.15, contour);
            Vector2[] Line26 = { v31, v26 };
            fun.drawBLine(dxf, Line26, 0.15, contour);
            Vector2[] Line27 = { v27, v32 };
            fun.drawBLine(dxf, Line27, 0.15, contour);
            Vector2[] Line28 = { v25, v33 };
            fun.drawBLine(dxf, Line28, 0.15, contour);
            Vector2[] Line29 = { v35, v32 };
            fun.drawBLine(dxf, Line29, 0.15, contour);
            Vector2[] Line30 = { v36, v32 };
            fun.drawBLine(dxf, Line30, 0.15, contour);
            Vector2[] Line31 = { v37, v38 };
            fun.drawBLine(dxf, Line31, 0.15, contour);
            Vector2[] Line32 = { v39, v40 };
            fun.drawBLine(dxf, Line32, 0.15, contour);
            Vector2[] Line33 = { v26, v41 };
            fun.drawBLine(dxf, Line33, 0.15, contour);
            Vector2[] Line34 = { v31, v42 };
            fun.drawBLine(dxf, Line34, 0.15, contour);
            Vector2[] Line35 = { v41, v42 };
            fun.drawBLine(dxf, Line35, 0.15, contour);
            //
            Vector2[] Line36 = { v44, v45 };
            fun.drawBLine(dxf, Line36, 0.15, contour);
            Vector2[] Line37 = { v43, v46 };
            fun.drawBLine(dxf, Line37, 0.15, contour);
            Vector2[] Line38 = { v45, v46 };
            fun.drawBLine(dxf, Line38, 0.15, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v44));
            Arc5.Vertexes.Add(new LwPolylineVertex(v45));
            Arc5.Vertexes[0].Bulge = Math.Tan(nf / 2) * (Math.Sin(ek) * wf / 7);
            fun.PolyFill(dxf, Arc5, 0.15, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v43));
            Arc6.Vertexes.Add(new LwPolylineVertex(v46));
            Arc6.Vertexes[0].Bulge = -Math.Tan(nf / 2) * (Math.Sin(ek) * wf / 7);
            fun.PolyFill(dxf, Arc6, 0.15, contour);
            Vector2[] Line39 = { v48, v49 };
            fun.drawBLine(dxf, Line39, 0.15, contour);
            Vector2[] Line40 = { v47, v50 };
            fun.drawBLine(dxf, Line40, 0.15, contour);
            Vector2[] Line41 = { v50, v49 };
            fun.drawBLine(dxf, Line41, 0.15, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v48));
            Arc7.Vertexes.Add(new LwPolylineVertex(v49));
            Arc7.Vertexes[0].Bulge = -Math.Tan(nf / 2) * (Math.Sin(ek) * wf / 7);
            fun.PolyFill(dxf, Arc7, 0.15, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v47));
            Arc8.Vertexes.Add(new LwPolylineVertex(v50));
            Arc8.Vertexes[0].Bulge = Math.Tan(nf / 2) * (Math.Sin(ek) * wf / 7);
            fun.PolyFill(dxf, Arc8, 0.15, contour);
            Vector2[] Line42 = { v47, v48 };
            fun.drawBLine(dxf, Line42, 0.15, contour);
            Vector2[] Line43 = { v51, v53 };
            fun.drawBLine(dxf, Line43, 0.15, contour);
            Vector2[] Line44 = { v52, v54 };
            fun.drawBLine(dxf, Line44, 0.15, contour);
            Vector2[] Line45 = { v53, v55 };
            fun.drawBLine(dxf, Line45, 0.15, contour);
            Vector2[] Line46 = { v54, v56 };
            fun.drawBLine(dxf, Line46, 0.15, contour);
            Vector2[] Line47 = { v57, v56 };
            fun.drawBLine(dxf, Line47, 0.15, contour);
            Vector2[] Line48 = { v55, v58 };
            fun.drawBLine(dxf, Line48, 0.15, contour);
            Vector2[] Line49 = { v54, v53 };
            fun.drawBLine(dxf, Line49, 0.15, contour);
            Vector2[] Line50 = { v57, v58 };
            fun.drawBLine(dxf, Line50, 0.15, contour);
            Vector2[] Line51 = { v57, v59 };
            fun.drawBLine(dxf, Line51, 0.15, contour);
            Vector2[] Line52 = { v58, v60 };
            fun.drawBLine(dxf, Line52, 0.15, contour);
            Vector2[] Line53 = { v59, v60 };
            fun.drawBLine(dxf, Line53, 0.15, contour);
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v61, 0, f * 3 / 4)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v61, Math.PI, f * 3 / 4)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v61, 0, f * 3 / 4)));
            fun.PolyFill(dxf, poly, 0.15, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v61, 0, f / 5)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v61, Math.PI, f / 5)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v61, 0, f / 5)));
            fun.PolyFill(dxf, poly1, 0.15, contour);
            Vector2[] Line54 = { v63, v64 };
            fun.drawBLine(dxf, Line54, 0.15, contour);
            Vector2[] Line55 = { v65, v66 };
            fun.drawBLine(dxf, Line55, 0.15, contour);
            Vector2[] Line56 = { v64, v66 };
            fun.drawBLine(dxf, Line56, 0.15, contour);
            Vector2[] Line57 = { v64, v67 };
            fun.drawBLine(dxf, Line57, 0.15, contour);
            Vector2[] Line58 = { v66, v68 };
            fun.drawBLine(dxf, Line58, 0.15, contour);
            Vector2[] Line59 = { v67, v69 };
            fun.drawBLine(dxf, Line59, 0.15, contour);
            Vector2[] Line60 = { v68, v70 };
            fun.drawBLine(dxf, Line60, 0.15, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v69));
            Arc9.Vertexes.Add(new LwPolylineVertex(v71));
            Arc9.Vertexes[0].Bulge = ((lf * 1 / 12) / (Math.Tan(ek))) * 1 / 5 * Math.Tan(ek);
            fun.PolyFill(dxf, Arc9, 0.15, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v70));
            Arc10.Vertexes.Add(new LwPolylineVertex(v72));
            Arc10.Vertexes[0].Bulge = -((lf / 6) / (Math.Tan(ek))) * 0.21 * Math.Tan(ek / 2);
            fun.PolyFill(dxf, Arc10, 0.15, contour);
            Vector2[] Line61 = { v71, v72 };
            fun.drawBLine(dxf, Line61, 0.15, contour);
            //2
            Vector2[] Line62 = { v73, v74 };
            fun.drawBLine(dxf, Line62, 0.15, contour);
            Vector2[] Line63 = { v73, v75 };
            fun.drawBLine(dxf, Line63, 0.15, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v75));
            Arc11.Vertexes.Add(new LwPolylineVertex(v76));
            Arc11.Vertexes[0].Bulge = -((lf * 1 / 13) / (Math.Tan(ek))) * 1 / 6 * Math.Tan(ek);
            fun.PolyFill(dxf, Arc11, 0.15, contour);
            Vector2[] Line64 = { v76, v77 };
            fun.drawBLine(dxf, Line64, 0.15, contour);
            Vector2[] Line65 = { v77, v78 };
            fun.drawBLine(dxf, Line65, 0.15, contour);
            Vector2[] Line66 = { v78, v79 };
            fun.drawBLine(dxf, Line66, 0.15, contour);
            Vector2[] Line67 = { v79, v80 };
            fun.drawBLine(dxf, Line67, 0.15, contour);
            Vector2[] Line68 = { v74, v80 };
            fun.drawBLine(dxf, Line68, 0.15, contour);
            Vector2[] Line69 = { v81, v80 };
            fun.drawBLine(dxf, Line69, 0.15, contour);
            Vector2[] Line70 = { v74, v82 };
            fun.drawBLine(dxf, Line70, 0.15, contour);
            Vector2[] Line71 = { v81, v82 };
            fun.drawBLine(dxf, Line71, 0.15, contour);
            Vector2[] Line72 = { v81, v83 };
            fun.drawBLine(dxf, Line72, 0.15, contour);
            Vector2[] Line73 = { v85, v84 };
            fun.drawBLine(dxf, Line73, 0.15, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v75));
            Arc12.Vertexes.Add(new LwPolylineVertex(v83));
            Arc12.Vertexes[0].Bulge = f / 8;
            fun.PolyFill(dxf, Arc12, 0.15, contour);
            Vector2[] Line74 = { v82, v86 };
            fun.drawBLine(dxf, Line74, 0.15, contour);
            Vector2[] Line75 = { v87, v89 };
            fun.drawBLine(dxf, Line75, 0.15, contour);
            Vector2[] Line76 = { v88, v90 };
            fun.drawBLine(dxf, Line76, 0.15, contour);
            Vector2[] Line77 = { v91, v92 };
            fun.drawBLine(dxf, Line77, 0.15, contour);
            Vector2[] Line78 = { v93, v92 };
            fun.drawBLine(dxf, Line78, 0.15, contour);
            Vector2[] Line79 = { v91, v94 };
            fun.drawBLine(dxf, Line79, 0.15, contour);
            Vector2[] Line80 = { v93, v94 };
            fun.drawBLine(dxf, Line80, 0.15, contour);
            Vector2[] Line81 = { v95, v94 };
            fun.drawBLine(dxf, Line81, 0.15, contour);
            Vector2[] Line82 = { v93, v96 };
            fun.drawBLine(dxf, Line82, 0.15, contour);
            Vector2[] Line83 = { v95, v96 };
            fun.drawBLine(dxf, Line83, 0.15, contour);
            LwPolyline poly2 = new LwPolyline();
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, 0, f * 3 / 2)));
            poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, Math.PI, f * 3 / 2)));
            poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, 0, f * 3 / 2)));
            fun.PolyFill(dxf, poly2, 0.1, contour);
            LwPolyline poly3 = new LwPolyline();
            poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, 0, f * 13 / 10)));
            poly3.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, Math.PI, f * 13 / 10)));
            poly3.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, 0, f * 13 / 10)));
            fun.PolyFill(dxf, poly3, 0.1, contour);
            LwPolyline poly4 = new LwPolyline();
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, 0, f * 6 / 5)));
            poly4.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, Math.PI, f * 6 / 5)));
            poly4.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v97, 0, f * 6 / 5)));
            fun.PolyFill(dxf, poly4, 0.1, contour);
            Vector2[] Line84 = { v98, v99 };
            fun.drawBLine(dxf, Line84, 0.15, contour);
            Vector2[] Line85 = { v98, v100 };
            fun.drawBLine(dxf, Line85, 0.15, contour);
            Vector2[] Line86 = { v101, v102 };
            fun.drawBLine(dxf, Line86, 0.15, contour);
            Vector2[] Line87 = { v101, v103 };
            fun.drawBLine(dxf, Line87, 0.15, contour);
            Vector2[] Line88 = { v102, v99 };
            fun.drawBLine(dxf, Line88, 0.15, contour);
            Vector2[] Line89 = { v103, v100 };
            fun.drawBLine(dxf, Line89, 0.15, contour);
            Vector2[] Line90 = { v73, v104 };
            fun.drawBLine(dxf, Line90, 0.15, contour);
            Vector2[] Line91 = { v105, v106 };
            fun.drawBLine(dxf, Line91, 0.15, contour);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v108.X, v108.Y), new Vector2(v108.X, v108.Y + wf * 5 / 2) }, 0.15, centre, Linetype.Center);
            LwPolyline poly5 = new LwPolyline();
            poly5.Vertexes.Add(new LwPolylineVertex(fun.Polar(v107, 0, f * 2 / 5)));
            poly5.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly5.Vertexes.Add(new LwPolylineVertex(fun.Polar(v107, Math.PI, f * 2 / 5)));
            poly5.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly5.Vertexes.Add(new LwPolylineVertex(fun.Polar(v107, 0, f * 2 / 5)));
            fun.PolyFill(dxf, poly5, 0.1, contour);
            LwPolyline poly6 = new LwPolyline();
            poly6.Vertexes.Add(new LwPolylineVertex(fun.Polar(v107, 0, f / 8)));
            poly6.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly6.Vertexes.Add(new LwPolylineVertex(fun.Polar(v107, Math.PI, f / 8)));
            poly6.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly6.Vertexes.Add(new LwPolylineVertex(fun.Polar(v107, 0, f / 8)));
            fun.PolyFill(dxf, poly6, 0.1, contour);
            LwPolyline hatchpoly1 = new LwPolyline();
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v109));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v110));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v111));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v112));
            hatchpoly1.IsClosed = true;
            String[] htype1 = new String[100];
            Line[] hline1 = new Line[100];
            int hnumst1 = hatchpoly1.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst1; i++)
            {
                htype1[i] = hatchpoly1.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype1[i] == "Line")
                {
                    hline1[i] = (Line)hatchpoly1.Explode()[i];
                }
            }
            {
                fun.hatchsuboflinew(dxf, htype1, hnumst1, 45, 5, hline1, hatching, 0.15);
            }
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 10;
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v79.X + lf * 1 / 3 + wf / 10, v79.Y), new Vector2(v79.X, v79.Y)), -offset / 6, 90, dimensionStyle);
            dim1.UserText = " X  ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(v112.X, v112.Y - wf), new Vector2(v112.X, v112.Y)), -offset * 3 / 2, 360, dimensionStyle);
            dim2.UserText = " Z  ";
            dxf.AddEntity(dim2);
            //
            Vector2[] Line92 = { v104, v106 };
            fun.drawBLine(dxf, Line92, 0.15, contour);
            LwPolyline poly7 = new LwPolyline();
            poly7.Vertexes.Add(new LwPolylineVertex(fun.Polar(v113, 0, f * 2 / 5)));
            poly7.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly7.Vertexes.Add(new LwPolylineVertex(fun.Polar(v113, Math.PI, f * 2 / 5)));
            poly7.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly7.Vertexes.Add(new LwPolylineVertex(fun.Polar(v113, 0, f * 2 / 5)));
            fun.PolyFill(dxf, poly7, 0.1, contour);
            DimensionStyle dimensionStyle2 = fun.CreateDimStyle();
            dimensionStyle2.ArrowSize = 0.2;
            dimensionStyle2.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle2.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle2.TextHeight = 0.5;
            double offset1 = 10;
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(v113.X, v113.Y), new Vector2(v79.X - wf, v79.Y)), -offset * 6 / 5, 270, dimensionStyle);
            dim3.UserText = " LF  ";
            dxf.AddEntity(dim3);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v113.X, v113.Y), new Vector2(v113.X - wf * 4 / 5, v113.Y + wf * 4 / 5) }, 0.15, centre, Linetype.Center);
            LwPolyline poly8 = new LwPolyline();
            LinearDimension dim4 = new LinearDimension(new Line(new Vector2(v108.X, v108.Y + wf * 5 / 2), new Vector2(v113.X, v113.Y)), -offset / 3, 180, dimensionStyle);
            dim4.UserText = " WF  ";
            dxf.AddEntity(dim4);
            Vector2[] Line93 = { v114, v116 };
            fun.drawBLine(dxf, Line93, 0.15, contour);
            Vector2[] Line94 = { v115, v117 };
            fun.drawBLine(dxf, Line94, 0.15, contour);
            Vector2[] Line95 = { v116, v117 };
            fun.drawBLine(dxf, Line95, 0.15, contour);
            Vector2[] Line96 = { v117, v118 };
            fun.drawBLine(dxf, Line96, 0.15, contour);
            Vector2[] Line97 = { v116, v119 };
            fun.drawBLine(dxf, Line97, 0.15, contour);
            Vector2[] Line98 = { v118, v120 };
            fun.drawBLine(dxf, Line98, 0.15, contour);
            Vector2[] Line99 = { v119, v121 };
            fun.drawBLine(dxf, Line99, 0.15, contour);
            Vector2[] Line100 = { v120, v121 };
            fun.drawBLine(dxf, Line100, 0.15, contour);
            Vector2[] Line101 = { v122, v124 };
            fun.drawBLine(dxf, Line101, 0.15, contour);
            Vector2[] Line102 = { v123, v125 };
            fun.drawBLine(dxf, Line102, 0.15, contour);
            Vector2[] Line103 = { v124, v125 };
            fun.drawBLine(dxf, Line103, 0.15, contour);
            Vector2[] Line104 = { v125, v126 };
            fun.drawBLine(dxf, Line104, 0.15, contour);
            Vector2[] Line105 = { v124, v127 };
            fun.drawBLine(dxf, Line105, 0.15, contour);
            Vector2[] Line106 = { v126, v128 };
            fun.drawBLine(dxf, Line106, 0.15, contour);
            Vector2[] Line107 = { v127, v129 };
            fun.drawBLine(dxf, Line107, 0.15, contour);
            Vector2[] Line108 = { v128, v129 };
            fun.drawBLine(dxf, Line108, 0.15, contour);
            //Vector2[] Line110 = { v113, v130 };
            //fun.drawBLine(dxf, Line110, 0.0, contour);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v108, v131), new Line(v113, v130), offset / 2, dimensionStyle);
            angdim2.UserText = "BAWS";
            dxf.AddEntity(angdim2);
            //3
            Vector2[] Line109 = { v132, v133 };
            fun.drawBLine(dxf, Line109, 0.15, contour);
            Vector2[] Line110 = { v132, v135 };
            fun.drawBLine(dxf, Line110, 0.15, contour);
            Vector2[] Line111 = { v134, v133 };
            fun.drawBLine(dxf, Line111, 0.15, contour);
            Vector2[] Line112 = { v134, v135 };
            fun.drawBLine(dxf, Line112, 0.19, contour);
            Vector2[] Line113 = { v134, v136 };
            fun.drawBLine(dxf, Line113, 0.15, contour);
            Vector2[] Line114 = { v135, v137 };
            fun.drawBLine(dxf, Line114, 0.15, contour);
            Vector2[] Line115 = { v137, v136 };
            fun.drawBLine(dxf, Line115, 0.15, contour);
            Vector2[] Line116 = { v136, v138 };
            fun.drawBLine(dxf, Line116, 0.15, contour);
            Vector2[] Line117 = { v138, v139 };
            fun.drawBLine(dxf, Line117, 0.15, contour);
            Vector2[] Line118 = { v140, v139 };
            fun.drawBLine(dxf, Line118, 0.15, contour);
            Vector2[] Line119 = { v135, v141 };
            fun.drawBLine(dxf, Line119, 0.15, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v142));
            Arc13.Vertexes.Add(new LwPolylineVertex(v141));
            Arc13.Vertexes[0].Bulge = -Math.Tan(fn / 2) * ((f / 4) / Math.Sin(fn / 2));
            fun.PolyFill(dxf, Arc13, 0.15, contour);
            Vector2[] Line120 = { v143, v142 };
            fun.drawBLine(dxf, Line120, 0.15, contour);
            Vector2[] Line121 = { v143, v144 };
            fun.drawBLine(dxf, Line121, 0.15, contour);
            Vector2[] Line122 = { v140, v145 };
            fun.drawBLine(dxf, Line122, 0.15, contour);
            Vector2[] Line123 = { v147, v146 };
            fun.drawBLine(dxf, Line123, 0.17, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v145));
            Arc14.Vertexes.Add(new LwPolylineVertex(v144));
            Arc14.Vertexes[0].Bulge = f * 2;
            fun.PolyFill(dxf, Arc14, 0.15, contour);
            Vector2[] Line124 = { v148, v149 };
            fun.drawBLine(dxf, Line124, 0.1, contour);
            LwPolyline poly9 = new LwPolyline();
            poly9.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, 0, f)));
            poly9.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly9.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, Math.PI, f)));
            poly9.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly9.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, 0, f)));
            fun.PolyFill(dxf, poly9, 0.08, contour);
            LwPolyline poly10 = new LwPolyline();
            poly10.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, 0, f * 11 / 12)));
            poly10.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly10.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, Math.PI, f * 11 / 12)));
            poly10.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly10.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, 0, f * 11 / 12)));
            fun.PolyFill(dxf, poly10, 0.08, contour);
            LwPolyline poly11 = new LwPolyline();
            poly11.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, 0, f * 10 / 12)));
            poly11.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly11.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, Math.PI, f * 10 / 12)));
            poly11.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly11.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, 0, f * 10 / 12)));
            fun.PolyFill(dxf, poly11, 0.08, contour);
            LwPolyline poly12 = new LwPolyline();
            poly12.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, 0, f * 7 / 12)));
            poly12.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly12.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, Math.PI, f * 7 / 12)));
            poly12.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly12.Vertexes.Add(new LwPolylineVertex(fun.Polar(v150, 0, f * 7 / 12)));
            fun.PolyFill(dxf, poly12, 0.05, contour);
            Vector2[] Line125 = { v162, v152 };
            fun.drawBLine(dxf, Line125, 0.05, contour);
            Vector2[] Line126 = { v152, v153 };
            fun.drawBLine(dxf, Line126, 0.05, contour);
            Vector2[] Line127 = { v154, v153 };
            fun.drawBLine(dxf, Line127, 0.05, contour);
            Vector2[] Line128 = { v154, v155 };
            fun.drawBLine(dxf, Line128, 0.05, contour);
            Vector2[] Line129 = { v155, v156 };
            fun.drawBLine(dxf, Line129, 0.05, contour);
            Vector2[] Line130 = { v157, v156 };
            fun.drawBLine(dxf, Line130, 0.05, contour);
            Vector2[] Line131 = { v157, v158 };
            fun.drawBLine(dxf, Line131, 0.05, contour);
            Vector2[] Line132 = { v159, v158 };
            fun.drawBLine(dxf, Line132, 0.05, contour);
            Vector2[] Line133 = { v159, v160 };
            fun.drawBLine(dxf, Line133, 0.05, contour);
            Vector2[] Line134 = { v161, v160 };
            fun.drawBLine(dxf, Line134, 0.05, contour);
            Vector2[] Line135 = { v161, v163 };
            fun.drawBLine(dxf, Line135, 0.05, contour);
            Vector2[] Line136 = { v162, v163 };
            fun.drawBLine(dxf, Line136, 0.05, contour);
            LinearDimension dim5 = new LinearDimension(new Line(new Vector2(v133.X, v133.Y), new Vector2(v133.X + wf / 2, v133.Y)), -offset / 6, 90, dimensionStyle);
            dim5.UserText = " X  ";
            dxf.AddEntity(dim5);
            LinearDimension dim6 = new LinearDimension(new Line(new Vector2(v133.X, v133.Y), new Vector2(v133.X, v133.Y - wf / 2)), -offset / 3, 360, dimensionStyle);
            dim6.UserText = " Z  ";
            dxf.AddEntity(dim6);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v140, v139), new Line(v164, v138), -offset * 3 / 2, dimensionStyle);
            angdim3.UserText = "BAWS";
            dxf.AddEntity(angdim3);
            LinearDimension dim7 = new LinearDimension(new Line(new Vector2(v132.X, v132.Y), new Vector2(v145.X - f * 3 / 2, v145.Y)), -offset / 2, 270, dimensionStyle);
            dim7.UserText = " LF  ";
            dxf.AddEntity(dim7);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v138.X, v138.Y), new Vector2(v164.X, v164.Y) }, centre, Linetype.Center);
            //LwPolyline poly13 = new LwPolyline();
            LinearDimension dim8 = new LinearDimension(new Line(new Vector2(v145.X - f * 3 / 2, v145.Y), new Vector2(v164.X, v164.Y)), -offset / 4, 180, dimensionStyle);
            dim8.UserText = " WF  ";
            dxf.AddEntity(dim8);
            LinearDimension dim9 = new LinearDimension(new Line(new Vector2(v147.X + f * 2.7, v146.Y + f / 2), new Vector2(v145.X - f * 1.7, v145.Y - f / 4)), -offset / 2, 342, dimensionStyle);
            dim9.UserText = " CDX  ";
            dxf.AddEntity(dim9);
            //4
            Vector2[] Line137 = { v166, v167 };
            fun.drawBLine(dxf, Line137, 0.15, contour);
            Vector2[] Line138 = { v168, v167 };
            fun.drawBLine(dxf, Line138, 0.15, contour);
            Vector2[] Line139 = { v166, v169 };
            fun.drawBLine(dxf, Line139, 0.15, contour);
            Vector2[] Line140 = { v168, v170 };
            fun.drawBLine(dxf, Line140, 0.15, contour);
            Vector2[] Line141 = { v169, v171 };
            fun.drawBLine(dxf, Line141, 0.15, contour);
            Vector2[] Line142 = { v170, v171 };
            fun.drawBLine(dxf, Line142, 0.15, contour);
            Vector2[] Line143 = { v172, v171 };
            fun.drawBLine(dxf, Line143, 0.15, contour);
            Vector2[] Line144 = { v173, v170 };
            fun.drawBLine(dxf, Line144, 0.15, contour);
            Vector2[] Line145 = { v172, v173 };
            fun.drawBLine(dxf, Line145, 0.15, contour);
            Vector2[] Line146 = { v174, v175 };
            fun.drawBLine(dxf, Line146, 0.15, contour);
            Vector2[] Line147 = { v176, v177 };
            fun.drawBLine(dxf, Line147, 0.15, contour);
            Vector2[] Line148 = { v178, v180 };
            fun.drawBLine(dxf, Line148, 0.15, contour);
            Vector2[] Line149 = { v179, v181 };
            fun.drawBLine(dxf, Line149, 0.15, contour);
            Vector2[] Line150 = { v181, v180 };
            fun.drawBLine(dxf, Line150, 0.15, contour);
            //Vector2[] Line151 = { v182, v183 };
            //fun.drawBLine(dxf, Line151, 0.15, contour);
            Vector2[] Line152 = { v182, v184 };
            fun.drawBLine(dxf, Line152, 0.15, contour);
            Vector2[] Line153 = { v183, v185 };
            fun.drawBLine(dxf, Line153, 0.15, contour);
            Vector2[] Line154 = { v184, v185 };
            fun.drawBLine(dxf, Line154, 0.15, contour);
            Vector2[] Line155 = { v180, v186 };
            fun.drawBLine(dxf, Line155, 0.15, contour);
            Vector2[] Line156 = { v181, v187 };
            fun.drawBLine(dxf, Line156, 0.15, contour);
            Vector2[] Line157 = { v184, v188 };
            fun.drawBLine(dxf, Line157, 0.15, contour);
            Vector2[] Line158 = { v185, v189 };
            fun.drawBLine(dxf, Line158, 0.15, contour);
            Vector2[] Line159 = { v190, v191 };
            fun.drawBLine(dxf, Line159, 0.15, contour);
            Vector2[] Line160 = { v192, v193 };
            fun.drawBLine(dxf, Line160, 0.15, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v190));
            Arc15.Vertexes.Add(new LwPolylineVertex(v194));
            Arc15.Vertexes[0].Bulge = f / 4;
            fun.PolyFill(dxf, Arc15, 0.15, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v192));
            Arc16.Vertexes.Add(new LwPolylineVertex(v195));
            Arc16.Vertexes[0].Bulge = -f / 3.5;
            fun.PolyFill(dxf, Arc16, 0.15, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v191));
            Arc17.Vertexes.Add(new LwPolylineVertex(v196));
            Arc17.Vertexes[0].Bulge = -f / 4;
            fun.PolyFill(dxf, Arc17, 0.15, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v193));
            Arc18.Vertexes.Add(new LwPolylineVertex(v197));
            Arc18.Vertexes[0].Bulge = f / 3.5;
            fun.PolyFill(dxf, Arc18, 0.15, contour);
            DimensionStyle dimensionStyle3 = fun.CreateDimStyle();
            dimensionStyle3.ArrowSize = 0.0001;
            dimensionStyle3.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle3.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle3.TextHeight = 0.0001;
            LinearDimension dim10 = new LinearDimension(new Line(new Vector2(v166.X, v166.Y), new Vector2(v167.X, v167.Y)), -offset / 2, 324, dimensionStyle);
            dim10.UserText = " CW  ";
            dxf.AddEntity(dim10);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v166, v169), new Line(v198, v169), -offset * 7 / 10, dimensionStyle);
            angdim4.UserText = "BAWS";
            dxf.AddEntity(angdim4);
            //LinearDimension dim11 = new LinearDimension(new Line(new Vector2(v169.X, v169.Y), new Vector2(v198.X, v198.Y)), -offset/8, 90, dimensionStyle2);
            //dim11.UserText = ".";
            //dxf.AddEntity(dim11);
            Vector2[] Line161 = { v199, v200 };
            fun.drawBLine(dxf, Line161, 0.05, contour);
            Vector2[] Line162 = { v201, v202 };
            fun.drawBLine(dxf, Line162, 0.05, contour);
            Vector2[] Line163 = { v203, v204 };
            fun.drawBLine(dxf, Line163, 0.05, contour);
            Vector2[] Line164 = { v205, v206 };
            fun.drawBLine(dxf, Line164, 0.05, contour);
            Vector2[] Line165 = { v169, v198 };
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
    }
    class ISO2901402F
    {
        public static void FigureF1(Dictionary<string, Object> data)//ISO 29014-2图片F.1
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层                                                                
            //作图
            //参数
            double pi = Math.PI;
            double lbb = 8.3;
            double an = 15 * pi / 180;
            double gan = 15 * pi / 180;
            double cw = 8;
            double anl = 30 * pi / 180;
            double kchr = 45 * pi / 180;
            double chwr = 0.5;
            double chwl = 0.5;
            string path = Convert.ToString(data["path"]);
            //坐标
            //左坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + 3 * Math.Cos(an), v1.Y + 3 * Math.Sin(an));
            Vector2 v3 = new Vector2(v2.X + 3 * Math.Cos(pi / 6), v2.Y + 3 * Math.Sin(pi / 6));
            Vector2 v4 = new Vector2(v3.X, lbb);
            Vector2 v5 = new Vector2(v4.X - 0.56, v4.Y + 1.4883);
            Vector2 v6 = new Vector2(3.95, 9.9346);
            Vector2 v7 = new Vector2(v6.X - 1.05, v6.Y - 0.53);
            Vector2 v8 = new Vector2(v1.X, lbb + 1);
            Vector2 v9 = new Vector2(v8.X, v8.Y - 1);
            Vector2 v10 = new Vector2(v1.X + 6 * Math.Sin(gan), v1.Y + 6 * Math.Cos(gan));
            Vector2 v11 = new Vector2(v1.X, v1.Y + 1);
            Vector2 v12 = new Vector2(v1.X + 2, v1.Y);
            //右坐标
            Vector2 v13 = new Vector2(v1.X + 15, v1.Y);
            Vector2 v14 = new Vector2(v13.X + cw, v13.Y);
            Vector2 v15 = new Vector2(v14.X + 0.5, v14.Y + 0.5);
            Vector2 v16 = new Vector2(v14.X - 0.43, 5.79);
            Vector2 v17 = new Vector2(v15.X + 0.5, 8.4);
            Vector2 v18 = new Vector2(v17.X, v17.Y + 1);
            Vector2 v19 = new Vector2(v16.X - 0.5, 9.12);
            Vector2 v20 = new Vector2(v19.X - 1.29, 9.4);
            Vector2 v21 = new Vector2(v20.X - 3.55, v20.Y);
            Vector2 v22 = new Vector2(v13.X + 0.93, v19.Y);
            Vector2 v23 = new Vector2(v18.X - 10.5, v18.Y);
            Vector2 v24 = new Vector2(v23.X, v23.Y - 1);
            Vector2 v25 = new Vector2(v16.X - 7.13, v16.Y);
            Vector2 v26 = new Vector2(v15.X - 9, v15.Y);
            Vector2 v27 = new Vector2(v26.X, v26.Y + 7.5);
            Vector2 v28 = new Vector2(v26.X, v26.Y - 0.5);
            //小左坐标
            Vector2 v29 = new Vector2(11.28, -9.35);
            Vector2 v30 = new Vector2(v29.X + 2.57, v29.Y + 3.0642);
            Vector2 v31 = new Vector2(v30.X, v30.Y - 1.58);
            Vector2 v32 = new Vector2(v29.X + 3.13, v29.Y + 0.789);
            Vector2 v33 = new Vector2(v32.X + 0.88, v29.Y + 0.3534);
            Vector2 v34 = new Vector2(v33.X + 0.16, v29.Y - 0.4164);
            Vector2 v35 = new Vector2(v34.X - 0.23, v29.Y - 0.6946);
            //小右坐标
            Vector2 v36 = new Vector2(v29.X + 14.47, v29.Y);
            Vector2 v37 = new Vector2(v29.X + 11.9, v30.Y);
            Vector2 v38 = new Vector2(v37.X, v31.Y);
            Vector2 v39 = new Vector2(v38.X - 0.56, v38.Y - 0.9);
            Vector2 v40 = new Vector2(v38.X - 1.4398, v38.Y - 1.33);
            Vector2 v41 = new Vector2(v40.X - 0.16, v40.Y - 0.7697);
            Vector2 v42 = new Vector2(v41.X + 0.23, v41.Y - 0.28);
            //上坐标
            Vector2 v43 = new Vector2(v13.X, v13.Y + 13);
            Vector2 v44 = new Vector2(v14.X, v14.Y + 13);
            Vector2 v45 = new Vector2(v44.X + 0.5 * Math.Cos(kchr), v44.Y + 0.5 * Math.Sin(kchr));
            Vector2 v46 = new Vector2(v16.X, v16.Y + 13);
            Vector2 v47 = new Vector2(v17.X, v17.Y + 13);
            Vector2 v48 = new Vector2(v18.X, v18.Y + 13);
            Vector2 v49 = new Vector2(v19.X, v19.Y + 13);
            Vector2 v50 = new Vector2(v20.X, v20.Y + 13);
            Vector2 v51 = new Vector2(v21.X, v21.Y + 13);
            Vector2 v52 = new Vector2(v22.X, v22.Y + 13);
            Vector2 v53 = new Vector2(v23.X, v23.Y + 13);
            Vector2 v54 = new Vector2(v24.X, v24.Y + 13);
            Vector2 v55 = new Vector2(v25.X, v25.Y + 13);
            Vector2 v56 = new Vector2(v26.X, v26.Y + 13);
            Vector2 v57 = new Vector2(v43.X - chwl, v43.Y);
            Vector2 v58 = new Vector2(v44.X + chwr, v44.Y);
            Vector2 v59 = new Vector2(v56.X, v56.Y + 6.8);
            Vector2 v60 = new Vector2(v54.X - 3, v54.Y);
            Vector2 v61 = new Vector2(v60.X, v60.Y + 3);
            Vector2 v62 = new Vector2(0.19, 0.723);
            Vector2 v63 = new Vector2(v45.X, v45.Y + 6.8);
            Vector2 v64 = new Vector2(v47.X + 3, v47.Y);
            Vector2 v65 = new Vector2(v64.X, v64.Y + 3);
            // 线段           
            //左图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            Vector2[] Line2 = { v3, v2 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes[0].Bulge = -0.2;
            fun.PolyFill(dxf, Arc1, 0.1, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v4));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = 0.4;
            fun.PolyFill(dxf, Arc2, 0.1, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            Arc3.Vertexes.Add(new LwPolylineVertex(v6));
            Arc3.Vertexes[0].Bulge = 0.15;
            fun.PolyFill(dxf, Arc3, 0.1, contour);
            Vector2[] Line3 = { v6, v7 };
            fun.drawBLine(dxf, Line3, 0.1, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v7));
            Arc4.Vertexes.Add(new LwPolylineVertex(v8));
            Arc4.Vertexes[0].Bulge = -0.24;
            fun.PolyFill(dxf, Arc4, 0.1, contour);
            Vector2[] Line4 = { v8, v9 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v9));
            Arc5.Vertexes.Add(new LwPolylineVertex(v10));
            Arc5.Vertexes[0].Bulge = -0.298;
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            Vector2[] Line5 = { v10, v1 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            Vector2[] Line6 = { v11, v1 };
            fun.drawBLine(dxf, Line6, 0, skviewdimensioning);
            //右图
            Vector2[] Line7 = { v13, v14 };
            fun.drawBLine(dxf, Line7, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v14));
            Arc6.Vertexes.Add(new LwPolylineVertex(v15));
            Arc6.Vertexes[0].Bulge = 0.3;
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            Vector2[] Line8 = { v15, v16 };
            fun.drawBLine(dxf, Line8, 0.3, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v16));
            Arc7.Vertexes.Add(new LwPolylineVertex(v17));
            Arc7.Vertexes[0].Bulge = -0.32;
            fun.PolyFill(dxf, Arc7, 0.3, contour);
            Vector2[] Line9 = { v17, v18 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v18));
            Arc8.Vertexes.Add(new LwPolylineVertex(v19));
            Arc8.Vertexes[0].Bulge = -0.02;
            fun.PolyFill(dxf, Arc8, 0.1, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v20));
            Arc9.Vertexes.Add(new LwPolylineVertex(v19));
            Arc9.Vertexes[0].Bulge = 0.12;
            fun.PolyFill(dxf, Arc9, 0.1, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v20));
            Arc10.Vertexes.Add(new LwPolylineVertex(v21));
            Arc10.Vertexes[0].Bulge = 0.25;
            fun.PolyFill(dxf, Arc10, 0.1, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v21));
            Arc11.Vertexes.Add(new LwPolylineVertex(v22));
            Arc11.Vertexes[0].Bulge = -0.1126;
            fun.PolyFill(dxf, Arc11, 0.1, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v22));
            Arc12.Vertexes.Add(new LwPolylineVertex(v23));
            Arc12.Vertexes[0].Bulge = 0.02;
            fun.PolyFill(dxf, Arc12, 0.1, contour);
            Vector2[] Line10 = { v23, v24 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v24));
            Arc13.Vertexes.Add(new LwPolylineVertex(v25));
            Arc13.Vertexes[0].Bulge = -0.32;
            fun.PolyFill(dxf, Arc13, 0.3, contour);
            Vector2[] Line11 = { v25, v26 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v26));
            Arc14.Vertexes.Add(new LwPolylineVertex(v13));
            Arc14.Vertexes[0].Bulge = 0.3;
            fun.PolyFill(dxf, Arc14, 0.3, contour);
            Vector2[] Line12 = { v27, v26 };
            fun.drawBLine(dxf, Line12, 0, skviewdimensioning);
            Vector2[] Line13 = { v28, v26 };
            fun.drawBLine(dxf, Line13, 0, skviewdimensioning);
            //下方小图（左）
            Vector2[] Line14 = { v29, v30 };
            fun.drawBLine(dxf, Line14, 0.3, contour);
            Vector2[] Line15 = { v30, v31 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v31));
            Arc15.Vertexes.Add(new LwPolylineVertex(v32));
            Arc15.Vertexes[0].Bulge = 0.1507;
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            Vector2[] Line16 = { v32, v33 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v33));
            Arc16.Vertexes.Add(new LwPolylineVertex(v34));
            Arc16.Vertexes[0].Bulge = -0.1912;
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            Vector2[] Line17 = { v34, v35 };
            fun.drawBLine(dxf, Line17, 0.3, contour);
            Vector2[] Line18 = { v29, v35 };
            fun.drawBLine(dxf, Line18, 0.3, contour);
            Vector2[] Line19 = { v26, v29 };
            fun.drawBLine(dxf, Line19, 0, skviewdimensioning);
            //下方小图（右）
            Vector2[] Line20 = { v36, v37 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            Vector2[] Line21 = { v38, v37 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            Vector2[] Line22 = { v15, v36 };
            fun.drawBLine(dxf, Line22, 0, skviewdimensioning);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v38));
            Arc17.Vertexes.Add(new LwPolylineVertex(v39));
            Arc17.Vertexes[0].Bulge = -0.1507;
            fun.PolyFill(dxf, Arc17, 0.3, contour);
            Vector2[] Line23 = { v39, v40 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v40));
            Arc18.Vertexes.Add(new LwPolylineVertex(v41));
            Arc18.Vertexes[0].Bulge = 0.1912;
            fun.PolyFill(dxf, Arc18, 0.3, contour);
            Vector2[] Line24 = { v41, v42 };
            fun.drawBLine(dxf, Line24, 0.3, contour);
            Vector2[] Line25 = { v42, v36 };
            fun.drawBLine(dxf, Line25, 0.3, contour);
            //上图
            Vector2[] Line26 = { v43, v44 };
            fun.drawBLine(dxf, Line26, 0.3, contour);
            Vector2[] Line27 = { v44, v45 };
            fun.drawBLine(dxf, Line27, 0.3, contour);
            Vector2[] Line28 = { v45, v46 };
            fun.drawBLine(dxf, Line28, 0.3, contour);
            Vector2[] Line29 = { v46, v47 };
            fun.drawBLine(dxf, Line29, 0.3, contour);
            Vector2[] Line30 = { v47, v48 };
            fun.drawBLine(dxf, Line30, 0.3, contour);
            Vector2[] Line31 = { v49, v48 };
            fun.drawBLine(dxf, Line31, 0.1, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v50));
            Arc19.Vertexes.Add(new LwPolylineVertex(v49));
            Arc19.Vertexes[0].Bulge = 0.1126;
            fun.PolyFill(dxf, Arc19, 0.1, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v50));
            Arc20.Vertexes.Add(new LwPolylineVertex(v51));
            Arc20.Vertexes[0].Bulge = 0.25;
            fun.PolyFill(dxf, Arc20, 0.1, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v52));
            Arc21.Vertexes.Add(new LwPolylineVertex(v51));
            Arc21.Vertexes[0].Bulge = 0.1126;
            fun.PolyFill(dxf, Arc21, 0.1, contour);
            Vector2[] Line32 = { v52, v53 };
            fun.drawBLine(dxf, Line32, 0.1, contour);
            Vector2[] Line33 = { v53, v54 };
            fun.drawBLine(dxf, Line33, 0.3, contour);
            Vector2[] Line34 = { v55, v54 };
            fun.drawBLine(dxf, Line34, 0.3, contour);
            Vector2[] Line35 = { v55, v56 };
            fun.drawBLine(dxf, Line35, 0.3, contour);
            Vector2[] Line36 = { v43, v56 };
            fun.drawBLine(dxf, Line36, 0.3, contour);
            Vector2[] Line37 = { v59, v56 };
            fun.drawBLine(dxf, Line37, 0, skviewdimensioning);
            Vector2[] Line38 = { v54, v60 };
            fun.drawBLine(dxf, Line38, 0, skviewdimensioning);
            Vector2[] Line39 = { v54, v61 };
            fun.drawBLine(dxf, Line39, 0, skviewdimensioning);
            Vector2[] Line40 = { v1, v62 };
            fun.drawBLine(dxf, Line40, 0, skviewdimensioning);
            Vector2[] Line41 = { v45, v63 };
            fun.drawBLine(dxf, Line41, 0, skviewdimensioning);
            Vector2[] Line42 = { v47, v65 };
            fun.drawBLine(dxf, Line42, 0, skviewdimensioning);
            //标注样式
            //箭头样式
            double offset = 3;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 5;
            //线段尺寸标注
            //尺寸1
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v1, v11), new Line(v1, v62), offset, dimensionStyle);
            angdim1.UserText = "GAN  ";
            dxf.AddEntity(angdim1);
            //尺寸2
            LinearDimension dim1 = new LinearDimension(new Line(v1, v9), offset - 2, 90, dimensionStyle);
            dim1.UserText = "LBB";
            dxf.AddEntity(dim1);
            //尺寸3
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v1, v2), new Line(v1, v12), offset, dimensionStyle);
            angdim2.UserText = "AN  ";
            dxf.AddEntity(angdim2);
            //尺寸4
            LinearDimension dim2 = new LinearDimension(new Line(v27, v28), offset, 90, dimensionStyle);
            dim2.UserText = "CDX";
            dxf.AddEntity(dim2);
            //尺寸5
            LinearDimension dim3 = new LinearDimension(new Line(v26, v15), offset + 2, 180, dimensionStyle);
            dim3.UserText = "CW";
            dxf.AddEntity(dim3);
            //尺寸6
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v29, v26), new Line(v29, v30), offset, dimensionStyle);
            angdim3.UserText = "ANL  ";
            dxf.AddEntity(angdim3);
            //尺寸6
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v36, v15), new Line(v36, v37), offset, dimensionStyle);
            angdim4.UserText = "ANR  ";
            dxf.AddEntity(angdim4);
            //尺寸7
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v43, v56), new Line(v43, v57), offset, dimensionStyle);
            angdim5.UserText = "KCHL  ";
            dxf.AddEntity(angdim5);
            //尺寸8
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v44, v45), new Line(v44, v58), offset, dimensionStyle);
            angdim6.UserText = "KCHR  ";
            dxf.AddEntity(angdim6);
            //尺寸9
            LinearDimension dim4 = new LinearDimension(new Line(v54, v59), offset + 2, 90, dimensionStyle);
            dim4.UserText = "CHWTL";
            dxf.AddEntity(dim4);
            //尺寸10
            Angular2LineDimension angdim7 = new Angular2LineDimension(new Line(v54, v60), new Line(v54, v61), offset, dimensionStyle);
            angdim7.UserText = "KCHTL ";
            dxf.AddEntity(angdim7);
            //尺寸11
            LinearDimension dim5 = new LinearDimension(new Line(v63, v47), offset + 2, 270, dimensionStyle);
            dim5.UserText = "CHWTR";
            dxf.AddEntity(dim5);
            //尺寸12
            Angular2LineDimension angdim8 = new Angular2LineDimension(new Line(v47, v65), new Line(v47, v64), offset, dimensionStyle);
            angdim8.UserText = "KCHTR ";
            dxf.AddEntity(angdim8);
            //尺寸13
            LinearDimension dim6 = new LinearDimension(new Line(v43, v56), offset, 180, dimensionStyle);
            dim6.UserText = "CHWL";
            dxf.AddEntity(dim6);
            //尺寸14
            LinearDimension dim7 = new LinearDimension(new Line(v44, v45), offset, 180, dimensionStyle);
            dim7.UserText = "CHWR";
            dxf.AddEntity(dim7);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF2(Dictionary<string, Object> data)//ISO 29014-2图片F.2
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层                                                                
            //作图
            //参数
            //图1
            double pi = Math.PI;
            double cw = 5;
            double ral = 10 * pi / 180;
            double rar = 10 * pi / 180;
            double psir = 15 * pi / 180;
            double an = 30 * pi / 180;
            double anl = 30 * pi / 180;
            double anr = 30 * pi / 180;
            double gan = 15 * pi / 180;
            double lbb = 6.2694;
            double psil = 15 * pi / 180;
            double pdx = 2.12;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + 4.2 * Math.Cos(psir), v1.Y + 4.2 * Math.Sin(psir));
            Vector2 v3 = new Vector2(v2.X + 0.36, v2.Y + 0.57);
            Vector2 v4 = new Vector2(v3.X - 4.2 * Math.Sin(rar), v3.Y + 4.2 * Math.Cos(rar));
            Vector2 v5 = new Vector2(4.78, 7.23);
            Vector2 v6 = new Vector2(v5.X, v5.Y + 1);
            Vector2 v7 = new Vector2(v6.X - cw / 2, v6.Y);
            Vector2 v8 = new Vector2(v1.X - 0.6162 - pdx, 8.51);
            Vector2 v9 = new Vector2(v8.X, v8.Y - 1);
            Vector2 v10 = new Vector2(v9.X + pdx, 6.22);
            Vector2 v11 = new Vector2(0.12, 4.7321);
            Vector2 v12 = new Vector2(v11.X - 4.2 * Math.Sin(ral), v11.Y - 4.2 * Math.Cos(ral));
            Vector2 v13 = new Vector2(v3.X, v3.Y + 5.469);
            //左小三角坐标
            Vector2 v14 = new Vector2(11.95, 3.1534);
            Vector2 v15 = new Vector2(v14.X - 2.5 * Math.Cos(an / 2), v14.Y + 2.5 * Math.Sin(an / 2));
            Vector2 v16 = new Vector2(v15.X - 0.433, v15.Y + 0.25);
            Vector2 v17 = new Vector2(v14.X - 1, v14.Y + 2);
            Vector2 v18 = new Vector2(v14.X - 0.48, v14.Y + 2.37);
            Vector2 v19 = new Vector2(v18.X + 0.6, v18.Y - 2.25);
            Vector2 v20 = new Vector2(v15.X, v15.Y - 1.2941);
            Vector2 v21 = new Vector2(v20.X, v1.Y);
            //上图坐标
            Vector2 v22 = new Vector2(2.72, 19.34);
            Vector2 v23 = new Vector2(1.35, v22.Y);
            Vector2 v24 = new Vector2(v23.X - 1.3693, v23.Y - 3.76);
            Vector2 v25 = new Vector2(v24.X - 0.47, v24.Y + 1.2955);
            Vector2 v26 = new Vector2(v25.X - 0.8302, v25.Y + 0.6522);
            Vector2 v27 = new Vector2(v26.X - 0.9783, v26.Y + 0.11);
            Vector2 v28 = new Vector2(v27.X - 0.41, v27.Y + 0.6681);
            Vector2 v29 = new Vector2(v28.X + 0.1243, v28.Y + 0.3412);

            Vector2 v30 = new Vector2(v24.X + 4.08, v24.Y);
            Vector2 v31 = new Vector2(v25.X + 5.0185, v25.Y);
            Vector2 v32 = new Vector2(v26.X + 6.6791, v26.Y);
            Vector2 v33 = new Vector2(v27.X + 8.6357, v27.Y);
            Vector2 v34 = new Vector2(v28.X + 9.4659, v28.Y);
            Vector2 v35 = new Vector2(v29.X + 9.2173, v29.Y);
            Vector2 v36 = new Vector2(v24.X + 2.04, v24.Y);
            //中间图坐标
            Vector2 v37 = new Vector2(v1.X + 21.72, v1.Y);
            Vector2 v38 = new Vector2(v37.X - 1.29, v37.Y + 4.8296);
            Vector2 v39 = new Vector2(v37.X, v37.Y + lbb);
            Vector2 v40 = new Vector2(v39.X, v39.Y + 1);
            Vector2 v41 = new Vector2(v40.X - 1.93, v40.Y - 0.15);
            Vector2 v42 = new Vector2(v41.X - 1.7016, v41.Y + 0.12);
            Vector2 v43 = new Vector2(v42.X - 0.4, v42.Y - 0.3626);
            Vector2 v44 = new Vector2(v38.X - 2.3698, v38.Y);
            Vector2 v45 = new Vector2(v44.X, v44.Y - 3.31);
            Vector2 v46 = new Vector2(v45.X + 1.73, v45.Y - 1);
            Vector2 v47 = new Vector2(v37.X, v37.Y - 2);
            Vector2 v48 = new Vector2(v47.X + 2 * Math.Tan(gan), v47.Y);
            //右小三角坐标
            Vector2 v49 = new Vector2(v14.X + 15.988, v14.Y);
            Vector2 v50 = new Vector2(v15.X + 20.483, v15.Y);
            Vector2 v51 = new Vector2(v16.X + 21.3491, v16.Y);
            Vector2 v52 = new Vector2(v17.X + 17.679, v17.Y);
            Vector2 v53 = new Vector2(v18.X + 16.9475, v18.Y);
            Vector2 v54 = new Vector2(v19.X + 15.7431, v19.Y);
            Vector2 v55 = new Vector2(v50.X, v49.Y - 0.6285);
            //右图
            Vector2 v56 = new Vector2(v1.X + 39.57, v1.Y);
            Vector2 v57 = new Vector2(v2.X + 31.3174, v2.Y);
            Vector2 v58 = new Vector2(v3.X + 30.613, v3.Y);
            Vector2 v59 = new Vector2(v4.X + 32.0839, v4.Y);
            Vector2 v60 = new Vector2(v5.X + 30, v5.Y);
            Vector2 v61 = new Vector2(v60.X, v60.Y + 1);
            Vector2 v62 = new Vector2(v7.X + 35.4594, v7.Y);
            Vector2 v63 = new Vector2(v8.X + 45.0414, v8.Y);
            Vector2 v64 = new Vector2(v63.X, v63.Y - 1);
            Vector2 v65 = new Vector2(v10.X + 40.8011, v10.Y);
            Vector2 v66 = new Vector2(v11.X + 39.3338, v11.Y);
            Vector2 v67 = new Vector2(v12.X + 40.8011, v12.Y);
            Vector2 v68 = new Vector2(v57.X, v56.Y);
            //线段
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = 0.1295;
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line2 = { v3, v4 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v4));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = -0.2878;
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            Vector2[] Line3 = { v5, v6 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v6));
            Arc3.Vertexes.Add(new LwPolylineVertex(v7));
            Arc3.Vertexes[0].Bulge = 0.2737;
            fun.PolyFill(dxf, Arc3, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v7));
            Arc4.Vertexes.Add(new LwPolylineVertex(v8));
            Arc4.Vertexes[0].Bulge = -0.304;
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Vector2[] Line4 = { v8, v9 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            Vector2[] Line5 = { v9, v10 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v10));
            Arc5.Vertexes.Add(new LwPolylineVertex(v11));
            Arc5.Vertexes[0].Bulge = -0.1934;
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            Vector2[] Line6 = { v11, v12 };
            fun.drawBLine(dxf, Line6, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v12));
            Arc6.Vertexes.Add(new LwPolylineVertex(v1));
            Arc6.Vertexes[0].Bulge = 0.3;
            fun.PolyFill(dxf, Arc6, 0.3, contour);
            Vector2[] Line7 = { v10, v12 };
            fun.drawBLine(dxf, Line7, 0, skviewdimensioning);
            Vector2[] Line8 = { v3, v13 };
            fun.drawBLine(dxf, Line8, 0, skviewdimensioning);
            //小三角（右）
            Vector2[] Line9 = { v2, v14 };
            fun.drawBLine(dxf, Line9, 0, skviewdimensioning);
            Vector2[] Line10 = { v14, v15 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v15, v16 };
            fun.drawBLine(dxf, Line11, 0.3, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v16));
            Arc7.Vertexes.Add(new LwPolylineVertex(v17));
            Arc7.Vertexes[0].Bulge = -0.2446;
            fun.PolyFill(dxf, Arc7, 0.3, contour);
            Vector2[] Line12 = { v17, v18 };
            fun.drawBLine(dxf, Line12, 0.3, contour);
            Vector2[] Line13 = { v18, v19 };
            fun.drawBLine(dxf, Line13, 0.3, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v19));
            Arc8.Vertexes.Add(new LwPolylineVertex(v14));
            Arc8.Vertexes[0].Bulge = -0.05;
            fun.PolyFill(dxf, Arc8, 0.3, contour);
            Vector2[] Line14 = { v14, v20 };
            fun.drawBLine(dxf, Line14, 0, skviewdimensioning);
            Vector2[] Line15 = { v1, v21 };
            fun.drawBLine(dxf, Line15, 0, skviewdimensioning);
            //上图
            Vector2[] Line16 = { v11, v22 };
            fun.drawBLine(dxf, Line16, 0, skviewdimensioning);
            Vector2[] Line17 = { v4, v23 };
            fun.drawBLine(dxf, Line17, 0, skviewdimensioning);
            Vector2[] Line18 = { v23, v24 };
            fun.drawBLine(dxf, Line18, 0.3, contour);
            Vector2[] Line19 = { v25, v24 };
            fun.drawBLine(dxf, Line19, 0.3, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v25));
            Arc9.Vertexes.Add(new LwPolylineVertex(v26));
            Arc9.Vertexes[0].Bulge = 0.1507;
            fun.PolyFill(dxf, Arc9, 0.3, contour);
            Vector2[] Line20 = { v26, v27 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v27));
            Arc10.Vertexes.Add(new LwPolylineVertex(v28));
            Arc10.Vertexes[0].Bulge = -0.1912;
            fun.PolyFill(dxf, Arc10, 0.3, contour);
            Vector2[] Line21 = { v28, v29 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            Vector2[] Line22 = { v29, v23 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            Vector2[] Line23 = { v22, v30 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            Vector2[] Line24 = { v30, v31 };
            fun.drawBLine(dxf, Line24, 0.3, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v31));
            Arc11.Vertexes.Add(new LwPolylineVertex(v32));
            Arc11.Vertexes[0].Bulge = -0.1507;
            fun.PolyFill(dxf, Arc11, 0.3, contour);
            Vector2[] Line25 = { v32, v33 };
            fun.drawBLine(dxf, Line25, 0.3, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v33));
            Arc12.Vertexes.Add(new LwPolylineVertex(v34));
            Arc12.Vertexes[0].Bulge = 0.1912;
            fun.PolyFill(dxf, Arc12, 0.3, contour);
            Vector2[] Line26 = { v34, v35 };
            fun.drawBLine(dxf, Line26, 0.3, contour);
            Vector2[] Line27 = { v22, v35 };
            fun.drawBLine(dxf, Line27, 0.3, contour);
            Vector2[] Line28 = { v22, v36 };
            fun.drawBLine(dxf, Line28, 0, skviewdimensioning);
            Vector2[] Line29 = { v23, v36 };
            fun.drawBLine(dxf, Line29, 0, skviewdimensioning);
            //中间图
            Vector2[] Line30 = { v37, v38 };
            fun.drawBLine(dxf, Line30, 0.3, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v38));
            Arc13.Vertexes.Add(new LwPolylineVertex(v39));
            Arc13.Vertexes[0].Bulge = -0.3878;
            fun.PolyFill(dxf, Arc13, 0.3, contour);
            Vector2[] Line31 = { v39, v40 };
            fun.drawBLine(dxf, Line31, 0.3, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v40));
            Arc14.Vertexes.Add(new LwPolylineVertex(v41));
            Arc14.Vertexes[0].Bulge = -0.15;
            fun.PolyFill(dxf, Arc14, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v42));
            Arc15.Vertexes.Add(new LwPolylineVertex(v41));
            Arc15.Vertexes[0].Bulge = -0.075;
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v42));
            Arc16.Vertexes.Add(new LwPolylineVertex(v43));
            Arc16.Vertexes[0].Bulge = 0.35;
            fun.PolyFill(dxf, Arc16, 0.3, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v44));
            Arc17.Vertexes.Add(new LwPolylineVertex(v43));
            Arc17.Vertexes[0].Bulge = -0.159;
            fun.PolyFill(dxf, Arc17, 0.3, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v44));
            Arc18.Vertexes.Add(new LwPolylineVertex(v45));
            Arc18.Vertexes[0].Bulge = -0.2305;
            fun.PolyFill(dxf, Arc18, 0.3, contour);
            Vector2[] Line32 = { v45, v46 };
            fun.drawBLine(dxf, Line32, 0.3, contour);
            Vector2[] Line33 = { v46, v37 };
            fun.drawBLine(dxf, Line33, 0.3, contour);
            Vector2[] Line34 = { v37, v47 };
            fun.drawBLine(dxf, Line34, 0, skviewdimensioning);
            Vector2[] Line35 = { v37, v48 };
            fun.drawBLine(dxf, Line35, 0, skviewdimensioning);
            Vector2[] Line36 = { v37, v39 };
            fun.drawBLine(dxf, Line36, 0, skviewdimensioning);
            Vector2[] Line37 = { v49, v50 };
            fun.drawBLine(dxf, Line37, 0.3, contour);
            Vector2[] Line38 = { v51, v50 };
            fun.drawBLine(dxf, Line38, 0.3, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v51));
            Arc19.Vertexes.Add(new LwPolylineVertex(v52));
            Arc19.Vertexes[0].Bulge = 0.2446;
            fun.PolyFill(dxf, Arc19, 0.3, contour);
            Vector2[] Line39 = { v52, v53 };
            fun.drawBLine(dxf, Line39, 0.3, contour);
            Vector2[] Line40 = { v53, v54 };
            fun.drawBLine(dxf, Line40, 0.3, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v54));
            Arc20.Vertexes.Add(new LwPolylineVertex(v49));
            Arc20.Vertexes[0].Bulge = 0.05;
            fun.PolyFill(dxf, Arc20, 0.3, contour);
            Vector2[] Line41 = { v49, v55 };
            fun.drawBLine(dxf, Line41, 0, skviewdimensioning);
            //右图
            Vector2[] Line42 = { v56, v57 };
            fun.drawBLine(dxf, Line42, 0.3, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v57));
            Arc21.Vertexes.Add(new LwPolylineVertex(v58));
            Arc21.Vertexes[0].Bulge = -0.1295;
            fun.PolyFill(dxf, Arc21, 0.3, contour);
            Vector2[] Line43 = { v58, v59 };
            fun.drawBLine(dxf, Line43, 0.3, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v59));
            Arc22.Vertexes.Add(new LwPolylineVertex(v60));
            Arc22.Vertexes[0].Bulge = 0.2878;
            fun.PolyFill(dxf, Arc22, 0.3, contour);
            Vector2[] Line44 = { v60, v61 };
            fun.drawBLine(dxf, Line44, 0.3, contour);
            LwPolyline Arc23 = new LwPolyline();
            Arc23.Vertexes.Add(new LwPolylineVertex(v61));
            Arc23.Vertexes.Add(new LwPolylineVertex(v62));
            Arc23.Vertexes[0].Bulge = -0.2737;
            fun.PolyFill(dxf, Arc23, 0.3, contour);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v63));
            Arc24.Vertexes.Add(new LwPolylineVertex(v62));
            Arc24.Vertexes[0].Bulge = -0.304;
            fun.PolyFill(dxf, Arc24, 0.3, contour);
            Vector2[] Line45 = { v63, v64 };
            fun.drawBLine(dxf, Line45, 0.3, contour);
            Vector2[] Line46 = { v64, v65 };
            fun.drawBLine(dxf, Line46, 0.3, contour);
            LwPolyline Arc25 = new LwPolyline();
            Arc25.Vertexes.Add(new LwPolylineVertex(v65));
            Arc25.Vertexes.Add(new LwPolylineVertex(v66));
            Arc25.Vertexes[0].Bulge = 0.1934;
            fun.PolyFill(dxf, Arc25, 0.3, contour);
            Vector2[] Line47 = { v66, v67 };
            fun.drawBLine(dxf, Line47, 0.3, contour);
            LwPolyline Arc26 = new LwPolyline();
            Arc26.Vertexes.Add(new LwPolylineVertex(v67));
            Arc26.Vertexes.Add(new LwPolylineVertex(v56));
            Arc26.Vertexes[0].Bulge = -0.3;
            fun.PolyFill(dxf, Arc26, 0.3, contour);
            Vector2[] Line48 = { v56, v68 };
            fun.drawBLine(dxf, Line48, 0, skviewdimensioning);
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 1;
            //线段尺寸标注
            //图1尺寸
            LinearDimension dim1 = new LinearDimension(new Line(v12, v3), offset, 180, dimensionStyle);
            dim1.UserText = "CW";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v10, v12), offset, 90, dimensionStyle);
            dim2.UserText = "CDX";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v12, v9), offset, 180, dimensionStyle);
            dim3.UserText = "PDX";
            dxf.AddEntity(dim3);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v12, v10), new Line(v12, v11), offset, dimensionStyle);
            angdim1.UserText = "RAL  ";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v3, v13), new Line(v3, v4), offset, dimensionStyle);
            angdim2.UserText = "RAR  ";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v14, v15), new Line(v14, v20), offset, dimensionStyle);
            angdim3.UserText = "AN  ";
            dxf.AddEntity(angdim3);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v1, v21), new Line(v1, v20), offset + 2, dimensionStyle);
            angdim4.UserText = "PSIR  ";
            dxf.AddEntity(angdim4);
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v22, v36), new Line(v22, v30), offset, dimensionStyle);
            angdim5.UserText = "ANL  ";
            dxf.AddEntity(angdim5);
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v23, v36), new Line(v23, v24), offset, dimensionStyle);
            angdim6.UserText = "ANR  ";
            dxf.AddEntity(angdim6);
            Angular2LineDimension angdim7 = new Angular2LineDimension(new Line(v37, v47), new Line(v37, v48), offset, dimensionStyle);
            angdim7.UserText = "GAN  ";
            dxf.AddEntity(angdim7);
            LinearDimension dim4 = new LinearDimension(new Line(v37, v39), offset, 270, dimensionStyle);
            dim4.UserText = "LBB";
            dxf.AddEntity(dim4);
            Angular2LineDimension angdim8 = new Angular2LineDimension(new Line(v49, v50), new Line(v49, v55), offset, dimensionStyle);
            angdim8.UserText = "AN  ";
            dxf.AddEntity(angdim8);
            Angular2LineDimension angdim9 = new Angular2LineDimension(new Line(v56, v57), new Line(v56, v68), offset, dimensionStyle);
            angdim9.UserText = "PSIL  ";
            dxf.AddEntity(angdim9);
            LinearDimension dim5 = new LinearDimension(new Line(v60, v67), offset + 5, 180, dimensionStyle);
            dim5.UserText = "PDX";
            dxf.AddEntity(dim5);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF3(Dictionary<string, Object> data)//ISO 29014-2图片F.3
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层            
            //作图
            //参数
            double pi = Math.PI;
            double pna = 80 * pi / 180;
            double cdx = 6.06;
            double pdx = 4.87;
            double par = 48 * pi / 180;
            double pal = 30 * pi / 180;
            double anl = 30 * pi / 180;
            double anr = 30 * pi / 180;
            double ral = 15 * pi / 180;
            double gan = 13 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //坐标
            //左图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + 10.3299 * Math.Cos(pi / 2 - par), v1.Y + 10.3299 * Math.Sin(pi / 2 - par));
            Vector2 v3 = new Vector2(v2.X + 0.3345, v2.Y + 0.1284);
            Vector2 v4 = new Vector2(v3.X + 0.3081, v3.Y);
            Vector2 v5 = new Vector2(v4.X, v4.Y + 1);
            Vector2 v6 = new Vector2(v5.X - 7.33, v5.Y);
            Vector2 v7 = new Vector2(v6.X - 5.94, v6.Y);
            Vector2 v8 = new Vector2(v7.X, v7.Y - 1);
            Vector2 v9 = new Vector2(v8.X + 1.2726, v8.Y - 1.06);
            Vector2 v10 = new Vector2(v8.X + pdx, v9.Y - cdx);
            Vector2 v11 = new Vector2(v8.X, v8.Y + 0.3);
            Vector2 v12 = new Vector2(v9.X + 0.3, v9.Y);
            Vector2 v13 = new Vector2(v1.X - 0.082, v1.Y + 0.4);
            Vector2 v14 = new Vector2(v2.X - 0.12, v2.Y + 0.3152);
            Vector2 v15 = new Vector2(v14.X + 0.77, v14.Y);
            Vector2 v65 = new Vector2(v1.X - 0.09, v1.Y - 0.0817);
            Vector2 v66 = new Vector2(v65.X, v65.Y - 5);
            Vector2 v67 = new Vector2(v66.X + 3, v66.Y);
            Vector2 v68 = new Vector2(v66.X - 5.5618, v66.Y);
            //上左
            Vector2 v16 = new Vector2(-6.19, 12.2787);
            Vector2 v17 = new Vector2(v1.X - 8.31, v1.Y + 13.7958);
            Vector2 v18 = new Vector2(v17.X + 3.01, v1.Y + 14.8856);
            Vector2 v19 = new Vector2(v18.X + 0.2181, v18.Y - 0.15);
            Vector2 v20 = new Vector2(v19.X, v19.Y - 0.8264);
            Vector2 v21 = new Vector2(v16.X + 0.26, v16.Y + 1.0768);
            Vector2 v22 = new Vector2(v2.X + 3.58, v2.Y + 4.6143);
            Vector2 v23 = new Vector2(v2.X + 5.96, v2.Y + 5.3671);
            Vector2 v24 = new Vector2(v2.X + 4.34, v2.Y + 7.1161);
            Vector2 v25 = new Vector2(v23.X - 1.82, v23.Y + 1.6701);
            Vector2 v26 = new Vector2(v25.X - 0.476, v25.Y - 0.73);
            Vector2 v27 = new Vector2(v23.X - 2.06, v23.Y + 0.34);
            //中图
            Vector2 v28 = new Vector2(v1.X + 17.23, v1.Y);
            Vector2 v29 = new Vector2(v28.X + 7.24, v28.Y + 6.7373);
            Vector2 v30 = new Vector2(v29.X + 0.34, v29.Y + 0.134);
            Vector2 v31 = new Vector2(v30.X + 0.0958, v30.Y);
            Vector2 v32 = new Vector2(v31.X, v31.Y + 1);
            Vector2 v33 = new Vector2(v32.X - 4.3426, v32.Y);
            Vector2 v34 = new Vector2(v33.X - 4.3347, v33.Y);
            Vector2 v35 = new Vector2(v34.X, v34.Y - 1);
            Vector2 v36 = new Vector2(v35.X + 1.3, v35.Y - 1.5609);
            Vector2 v37 = new Vector2(v28.X - 0.17, v28.Y + 0.0832);
            Vector2 v38 = new Vector2(v35.X, v35.Y + 0.2);
            Vector2 v39 = new Vector2(v36.X + 0.2, v36.Y);
            Vector2 v40 = new Vector2(v28.X, v28.Y + 0.2);
            Vector2 v41 = new Vector2(v29.X, v29.Y + 0.3027);
            Vector2 v42 = new Vector2(v41.X + 0.24, v41.Y);
            Vector2 v70 = new Vector2(v28.X - 0.189, v28.Y - 0.1759);
            Vector2 v71 = new Vector2(v28.X, v28.Y - 1);
            //中上图
            Vector2 v43 = new Vector2(v28.X + 1.92, v28.Y + 14.2823);
            Vector2 v44 = new Vector2(v28.X + 1.28, v28.Y + 16.6522);
            Vector2 v45 = new Vector2(v28.X + 3.99, v28.Y + 16.4119);
            Vector2 v46 = new Vector2(v45.X + 0.22, v28.Y + 15.9342);
            Vector2 v47 = new Vector2(v45.X, v45.Y - 1.0482);
            Vector2 v48 = new Vector2(v47.X - 1.2067, v47.Y - 0.23);
            Vector2 v49 = new Vector2(v29.X + 6.82, v29.Y + 7.3099);
            Vector2 v50 = new Vector2(v49.X - 1.89, v49.Y + 1.7161);
            Vector2 v51 = new Vector2(v50.X - 0.1318, v50.Y - 0.33);
            Vector2 v52 = new Vector2(v50.X - 0.5039, v50.Y - 0.8);
            Vector2 v53 = new Vector2(v52.X + 0.2817, v52.Y - 0.75);
            Vector2 v54 = new Vector2(v52.X, v52.Y - 1.69);
            Vector2 v69 = new Vector2(v36.X - 0.29, v36.Y + 0.9799);
            //右图
            Vector2 v55 = new Vector2(v28.X + 19.17, v28.Y);
            Vector2 v56 = new Vector2(v55.X - 1.28, v55.Y + 5.4985);
            Vector2 v57 = new Vector2(v55.X, v56.Y + 1.64);
            Vector2 v58 = new Vector2(v57.X, v57.Y + 0.5);
            Vector2 v59 = new Vector2(v58.X - 2.3997, v58.Y);
            Vector2 v60 = new Vector2(v59.X - 1.36, v59.Y + 0.3867);
            Vector2 v61 = new Vector2(v60.X - 0.45, v60.Y - 0.2);
            Vector2 v62 = new Vector2(v61.X - 0.3555, v61.Y - 2.05);
            Vector2 v63 = new Vector2(v62.X, v62.Y - 3.873);
            Vector2 v64 = new Vector2(v55.X - 2.41, v55.Y + 0.647);
            Vector2 v72 = new Vector2(v55.X, v55.Y - 2);
            Vector2 v73 = new Vector2(v72.X + 0.4617, v72.Y);
            //左图
            //连线
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.3, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = -0.0332;
            fun.PolyFill(dxf, Arc1, 0.3, contour);
            Vector2[] Line2 = { v3, v4 };
            fun.drawBLine(dxf, Line2, 0.3, contour);
            Vector2[] Line3 = { v4, v5 };
            fun.drawBLine(dxf, Line3, 0.3, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes.Add(new LwPolylineVertex(v6));
            Arc2.Vertexes[0].Bulge = 0.173;
            fun.PolyFill(dxf, Arc2, 0.3, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v7));
            Arc3.Vertexes.Add(new LwPolylineVertex(v6));
            Arc3.Vertexes[0].Bulge = 0.173;
            fun.PolyFill(dxf, Arc3, 0.3, contour);
            Vector2[] Line4 = { v7, v8 };
            fun.drawBLine(dxf, Line4, 0.3, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v8));
            Arc4.Vertexes.Add(new LwPolylineVertex(v9));
            Arc4.Vertexes[0].Bulge = -0.1661;
            fun.PolyFill(dxf, Arc4, 0.3, contour);
            Vector2[] Line5 = { v9, v10 };
            fun.drawBLine(dxf, Line5, 0.3, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v10));
            Arc5.Vertexes.Add(new LwPolylineVertex(v1));
            Arc5.Vertexes[0].Bulge = 0.0366;
            fun.PolyFill(dxf, Arc5, 0.3, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v11));
            Arc6.Vertexes.Add(new LwPolylineVertex(v12));
            Arc6.Vertexes[0].Bulge = -0.1661;
            fun.PolyFillandlinetype(dxf, Arc6, 0, centre, Linetype.Dashed);
            Vector2[] Line6 = { v12, v13 };
            fun.drawPlinetype(dxf, Line6, 0.15, centre, Linetype.Dashed);
            Vector2[] Line7 = { v14, v13 };
            fun.drawPlinetype(dxf, Line7, 0.15, centre, Linetype.Dashed);
            Vector2[] Line8 = { v14, v15 };
            fun.drawPlinetype(dxf, Line8, 0.15, centre, Linetype.Dashed);
            Vector2[] Line41 = { v65, v66 };
            fun.drawBLine(dxf, Line41, 0, skviewdimensioning);
            Vector2[] Line42 = { v65, v67 };
            fun.drawBLine(dxf, Line42, 0, skviewdimensioning);
            Vector2[] Line43 = { v65, v68 };
            fun.drawBLine(dxf, Line43, 0, skviewdimensioning);
            //上左
            Vector2[] Line9 = { v16, v17 };
            fun.drawBLine(dxf, Line9, 0.3, contour);
            Vector2[] Line10 = { v18, v17 };
            fun.drawBLine(dxf, Line10, 0.3, contour);
            Vector2[] Line11 = { v18, v19 };
            fun.drawBLine(dxf, Line11, 0.1, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            Arc7.Vertexes.Add(new LwPolylineVertex(v20));
            Arc7.Vertexes[0].Bulge = -0.2132;
            fun.PolyFill(dxf, Arc7, 0.1, contour);
            Vector2[] Line12 = { v20, v21 };
            fun.drawBLine(dxf, Line12, 0.1, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v16));
            Arc8.Vertexes.Add(new LwPolylineVertex(v21));
            Arc8.Vertexes[0].Bulge = -0.2098;
            fun.PolyFill(dxf, Arc8, 0.1, contour);
            Vector2[] Line13 = { v17, v9 };
            fun.drawBLine(dxf, Line13, 0, skviewdimensioning);
            Vector2[] Line14 = { v2, v23 };
            fun.drawBLine(dxf, Line14, 0, skviewdimensioning);
            Vector2[] Line15 = { v22, v23 };
            fun.drawBLine(dxf, Line15, 0.3, contour);
            Vector2[] Line16 = { v24, v23 };
            fun.drawBLine(dxf, Line16, 0.3, contour);
            Vector2[] Line17 = { v24, v25 };
            fun.drawBLine(dxf, Line17, 0.1, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v25));
            Arc9.Vertexes.Add(new LwPolylineVertex(v26));
            Arc9.Vertexes[0].Bulge = 0.1458;
            fun.PolyFill(dxf, Arc9, 0.1, contour);
            Vector2[] Line18 = { v26, v27 };
            fun.drawBLine(dxf, Line18, 0.1, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v22));
            Arc10.Vertexes.Add(new LwPolylineVertex(v27));
            Arc10.Vertexes[0].Bulge = 0.1756;
            fun.PolyFill(dxf, Arc10, 0.1, contour);
            //中图
            Vector2[] Line19 = { v28, v29 };
            fun.drawBLine(dxf, Line19, 0.3, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v29));
            Arc11.Vertexes.Add(new LwPolylineVertex(v30));
            Arc11.Vertexes[0].Bulge = 0.0347;
            fun.PolyFill(dxf, Arc11, 0.3, contour);
            Vector2[] Line20 = { v30, v31 };
            fun.drawBLine(dxf, Line20, 0.3, contour);
            Vector2[] Line21 = { v31, v32 };
            fun.drawBLine(dxf, Line21, 0.3, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v32));
            Arc12.Vertexes.Add(new LwPolylineVertex(v33));
            Arc12.Vertexes[0].Bulge = 0.239;
            fun.PolyFill(dxf, Arc12, 0.3, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v34));
            Arc13.Vertexes.Add(new LwPolylineVertex(v33));
            Arc13.Vertexes[0].Bulge = 0.239;
            fun.PolyFill(dxf, Arc13, 0.3, contour);
            Vector2[] Line22 = { v34, v35 };
            fun.drawBLine(dxf, Line22, 0.3, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v35));
            Arc14.Vertexes.Add(new LwPolylineVertex(v36));
            Arc14.Vertexes[0].Bulge = -0.2016;
            fun.PolyFill(dxf, Arc14, 0.3, contour);
            Vector2[] Line23 = { v37, v36 };
            fun.drawBLine(dxf, Line23, 0.3, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v37));
            Arc15.Vertexes.Add(new LwPolylineVertex(v28));
            Arc15.Vertexes[0].Bulge = 0.0549;
            fun.PolyFill(dxf, Arc15, 0.3, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v38));
            Arc16.Vertexes.Add(new LwPolylineVertex(v39));
            Arc16.Vertexes[0].Bulge = -0.316;
            fun.PolyFill(dxf, Arc16, 0, centre);
            Vector2[] Line24 = { v39, v40 };
            fun.drawPlinetype(dxf, Line24, 0.15, centre, Linetype.Dashed);
            Vector2[] Line25 = { v41, v40 };
            fun.drawPlinetype(dxf, Line25, 0.15, centre, Linetype.Dashed);
            Vector2[] Line26 = { v41, v42 };
            fun.drawPlinetype(dxf, Line26, 0.15, centre, Linetype.Dashed);
            Vector2[] Line44 = { v69, v37 };
            fun.drawBLine(dxf, Line44, 0, skviewdimensioning);
            //中上图
            Vector2[] Line27 = { v36, v44 };
            fun.drawBLine(dxf, Line27, 0, skviewdimensioning);
            Vector2[] Line28 = { v43, v44 };
            fun.drawBLine(dxf, Line28, 0.3, contour);
            Vector2[] Line29 = { v45, v44 };
            fun.drawBLine(dxf, Line29, 0.3, contour);
            Vector2[] Line30 = { v45, v46 };
            fun.drawBLine(dxf, Line30, 0.1, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v46));
            Arc17.Vertexes.Add(new LwPolylineVertex(v47));
            Arc17.Vertexes[0].Bulge = -0.1219;
            fun.PolyFill(dxf, Arc17, 0.1, contour);
            Vector2[] Line31 = { v47, v48 };
            fun.drawBLine(dxf, Line31, 0.1, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v48));
            Arc18.Vertexes.Add(new LwPolylineVertex(v43));
            Arc18.Vertexes[0].Bulge = 0.1551;
            fun.PolyFill(dxf, Arc18, 0.1, contour);
            Vector2[] Line32 = { v29, v49 };
            fun.drawBLine(dxf, Line32, 0, skviewdimensioning);
            Vector2[] Line33 = { v50, v49 };
            fun.drawBLine(dxf, Line33, 0.3, contour);
            Vector2[] Line34 = { v50, v51 };
            fun.drawBLine(dxf, Line34, 0.1, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v51));
            Arc19.Vertexes.Add(new LwPolylineVertex(v52));
            Arc19.Vertexes[0].Bulge = 0.1772;
            fun.PolyFill(dxf, Arc19, 0.1, contour);
            Vector2[] Line35 = { v52, v53 };
            fun.drawBLine(dxf, Line35, 0.1, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v53));
            Arc20.Vertexes.Add(new LwPolylineVertex(v54));
            Arc20.Vertexes[0].Bulge = -0.0959;
            fun.PolyFill(dxf, Arc20, 0.1, contour);
            Vector2[] Line36 = { v54, v49 };
            fun.drawBLine(dxf, Line36, 0.1, contour);
            //右图
            Vector2[] Line37 = { v55, v56 };
            fun.drawBLine(dxf, Line37, 0.3, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v56));
            Arc21.Vertexes.Add(new LwPolylineVertex(v57));
            Arc21.Vertexes[0].Bulge = -0.262;
            fun.PolyFill(dxf, Arc21, 0.3, contour);
            Vector2[] Line38 = { v57, v58 };
            fun.drawBLine(dxf, Line38, 0.3, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v58));
            Arc22.Vertexes.Add(new LwPolylineVertex(v59));
            Arc22.Vertexes[0].Bulge = -0.228;
            fun.PolyFill(dxf, Arc22, 0.3, contour);
            LwPolyline Arc23 = new LwPolyline();
            Arc23.Vertexes.Add(new LwPolylineVertex(v59));
            Arc23.Vertexes.Add(new LwPolylineVertex(v60));
            Arc23.Vertexes[0].Bulge = 0.1;
            fun.PolyFill(dxf, Arc23, 0.3, contour);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v61));
            Arc24.Vertexes.Add(new LwPolylineVertex(v60));
            Arc24.Vertexes[0].Bulge = -0.254;
            fun.PolyFill(dxf, Arc24, 0.3, contour);
            LwPolyline Arc25 = new LwPolyline();
            Arc25.Vertexes.Add(new LwPolylineVertex(v61));
            Arc25.Vertexes.Add(new LwPolylineVertex(v62));
            Arc25.Vertexes[0].Bulge = 0.2463;
            fun.PolyFill(dxf, Arc25, 0.3, contour);
            LwPolyline Arc26 = new LwPolyline();
            Arc26.Vertexes.Add(new LwPolylineVertex(v63));
            Arc26.Vertexes.Add(new LwPolylineVertex(v62));
            Arc26.Vertexes[0].Bulge = 0.1463;
            fun.PolyFill(dxf, Arc26, 0.3, contour);
            Vector2[] Line39 = { v63, v64 };
            fun.drawBLine(dxf, Line39, 0.3, contour);
            Vector2[] Line40 = { v55, v64 };
            fun.drawBLine(dxf, Line40, 0.3, contour);
            Vector2[] Line45 = { v55, v72 };
            fun.drawBLine(dxf, Line45, 0, skviewdimensioning);
            Vector2[] Line46 = { v55, v73 };
            fun.drawBLine(dxf, Line46, 0, skviewdimensioning);
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 3;
            //线段尺寸标注
            //左图尺寸
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v65, v1), new Line(v65, v9), offset, dimensionStyle);
            angdim1.UserText = "PNA  ";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v65, v66), new Line(v65, v67), offset, dimensionStyle);
            angdim2.UserText = "PAL  ";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v65, v68), new Line(v65, v66), offset, dimensionStyle);
            angdim3.UserText = "PAR  ";
            dxf.AddEntity(angdim3);
            LinearDimension dim1 = new LinearDimension(new Line(v10, v9), offset, 90, dimensionStyle);
            dim1.UserText = "CDX ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v10, v8), offset, 180, dimensionStyle);
            dim2.UserText = "PDX ";
            dxf.AddEntity(dim2);
            //上左坐标
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v17, v9), new Line(v17, v16), offset, dimensionStyle);
            angdim4.UserText = "ANL  ";
            dxf.AddEntity(angdim4);
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v23, v2), new Line(v23, v22), offset, dimensionStyle);
            angdim5.UserText = "ANR  ";
            dxf.AddEntity(angdim5);
            //中图
            LinearDimension dim3 = new LinearDimension(new Line(v35, v28), offset, 180, dimensionStyle);
            dim3.UserText = "PDX ";
            dxf.AddEntity(dim3);
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v49, v29), new Line(v49, v54), offset, dimensionStyle);
            angdim6.UserText = "ANR  ";
            dxf.AddEntity(angdim6);
            Angular2LineDimension angdim7 = new Angular2LineDimension(new Line(v37, v69), new Line(v37, v36), offset + 3, dimensionStyle);
            angdim7.UserText = "RAL  ";
            dxf.AddEntity(angdim7);
            Angular2LineDimension angdim8 = new Angular2LineDimension(new Line(v70, v37), new Line(v70, v28), offset, dimensionStyle);
            angdim8.UserText = "PNA  ";
            dxf.AddEntity(angdim8);
            Angular2LineDimension angdim9 = new Angular2LineDimension(new Line(v44, v36), new Line(v44, v43), offset, dimensionStyle);
            angdim9.UserText = "ANL  ";
            dxf.AddEntity(angdim9);
            Angular2LineDimension angdim10 = new Angular2LineDimension(new Line(v49, v29), new Line(v49, v54), offset, dimensionStyle);
            angdim10.UserText = "ANR  ";
            dxf.AddEntity(angdim10);
            LinearDimension dim4 = new LinearDimension(new Line(v37, v69), offset, 90, dimensionStyle);
            dim4.UserText = "CDX ";
            dxf.AddEntity(dim4);
            Angular2LineDimension angdim11 = new Angular2LineDimension(new Line(v28, v70), new Line(v28, v71), offset, dimensionStyle);
            angdim11.UserText = "PAR  ";
            dxf.AddEntity(angdim11);
            Angular2LineDimension angdim12 = new Angular2LineDimension(new Line(v55, v72), new Line(v55, v73), offset, dimensionStyle);
            angdim12.UserText = "GAN  ";
            dxf.AddEntity(angdim12);
            LinearDimension dim5 = new LinearDimension(new Line(v55, v57), offset, 270, dimensionStyle);
            dim5.UserText = "LBB ";
            dxf.AddEntity(dim5);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF4(Dictionary<string, Object> data)//ISO 29014-2图片F.4
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层            
            //作图
            //参数
            //图一和上图
            double pi = Math.PI;
            double cf = 3;
            double cdx = 10.32;
            double anr = 30 * pi / 180;
            double anl = 24 * pi / 180;
            double ral = 10 * pi / 180;
            double rar = 9 * pi / 180;
            double an = 15 * pi / 180;
            double psirr = 30 * pi / 180;
            double psirl = 30 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //坐标
            //图一
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + cf, v1.Y);
            Vector2 v3 = new Vector2(v2.X + 6 * Math.Cos(psirr), v2.Y + 6 * Math.Sin(psirr));
            Vector2 v4 = new Vector2(v3.X + 0.0485, v3.Y + 0.104);
            Vector2 v5 = new Vector2(v4.X - 5 * Math.Sin(rar), v4.Y + 5 * Math.Cos(rar));
            Vector2 v6 = new Vector2(v5.X + 1.1615, v5.Y + 2.85);
            Vector2 v7 = new Vector2(v6.X, v6.Y + 2.4);
            Vector2 v8 = new Vector2(v2.X, v2.Y + 13.1124);
            Vector2 v9 = new Vector2(v8.X - 5.5, v8.Y + 0.13);
            Vector2 v10 = new Vector2(v9.X, v9.Y - 2);
            Vector2 v11 = new Vector2(v1.X, v1.Y + cdx);
            Vector2 v12 = new Vector2(v1.X + 7.85 * Math.Sin(ral), v1.Y + 7.85 * Math.Cos(ral));
            Vector2 v13 = new Vector2(v1.X - 0.0984, v1.Y + 0.1177);
            //上右图
            Vector2 v14 = new Vector2(v1.X + 6.19, v1.Y + 28.5515);
            Vector2 v15 = new Vector2(v14.X - 0.7397, v14.Y + 2.91);
            Vector2 v16 = new Vector2(v15.X + 2.828, v15.Y - 1);
            Vector2 v17 = new Vector2(v16.X - 0.77, v16.Y - 1.0489);
            //上左图
            Vector2 v18 = new Vector2(v14.X - 3.71, v14.Y);
            Vector2 v19 = new Vector2(v15.X - 2.18, v15.Y);
            Vector2 v20 = new Vector2(v16.X - 7.89, v16.Y);
            Vector2 v21 = new Vector2(v17.X - 6.34, v17.Y);
            //图一右
            Vector2 v22 = new Vector2(v1.X + 17.22, v1.Y + 16.7737);
            Vector2 v23 = new Vector2(v22.X + 0.49, v22.Y - 0.1);
            Vector2 v24 = new Vector2(v1.X + 20.67, v1.Y + 17.1962);
            Vector2 v25 = new Vector2(v24.X - 1.93, v24.Y + 2.29);
            Vector2 v26 = new Vector2(v25.X - 0.2529, v25.Y - 0.43);
            Vector2 v27 = new Vector2(v3.X + 7.85, v3.Y + 4.535);
            Vector2 v28 = new Vector2(v27.X - 3, v27.Y + 5.1962);
            Vector2 v29 = new Vector2(v4.X, v4.Y + 7.3968);
            Vector2 v30 = new Vector2(v1.X + 12, v1.Y);
            //图一内部虚线
            Vector2 v31 = new Vector2(v10.X, v10.Y + 0.5);
            Vector2 v32 = new Vector2(v11.X, v11.Y + 0.5);
            Vector2 v33 = new Vector2(v12.X + 0.5, v12.Y);
            Vector2 v34 = new Vector2(v1.X + 0.39, v1.Y + 0.5);
            Vector2 v35 = new Vector2(v2.X, v2.Y + 0.5);
            Vector2 v36 = new Vector2(v35.X + 4.6532, v35.Y + 2.7603);
            Vector2 v37 = new Vector2(v36.X - 0.8177, v36.Y + 4.5771);
            Vector2 v38 = new Vector2(v6.X, v6.Y + 0.5);
            //直角
            Vector2 v39 = new Vector2(v27.X - 0.43, v27.Y - 0.25);
            Vector2 v40 = new Vector2(v27.X - 0.68, v27.Y + 0.183);
            Vector2 v41 = new Vector2(v27.X - 0.25, v27.Y + 0.433);
            Vector2 v42 = new Vector2(v28.X + 0.25, v28.Y - 0.433);
            Vector2 v43 = new Vector2(v28.X + 0.68, v28.Y - 0.183);
            Vector2 v44 = new Vector2(v28.X + 0.43, v28.Y + 0.25);
            //图二
            Vector2 v45 = new Vector2(v2.X + 30, v2.Y);
            Vector2 v46 = new Vector2(v45.X - 1.94, v45.Y + 7.2444);
            Vector2 v47 = new Vector2(v45.X, v45.Y + 9.92);
            Vector2 v48 = new Vector2(v47.X, v47.Y + 1);
            Vector2 v49 = new Vector2(v45.X - 4 * Math.Cos(an), v48.Y);
            Vector2 v50 = new Vector2(v49.X - 1.72, v49.Y + 0.2309);
            Vector2 v51 = new Vector2(v50.X - 1.7401, v50.Y - 2.8546);
            Vector2 v52 = new Vector2(v51.X, v51.Y - 5.0283);
            Vector2 v53 = new Vector2(v52.X + 4 * Math.Cos(2 * an), v52.Y - 4 * Math.Sin(2 * an));
            Vector2 v54 = new Vector2(v45.X - 6 * Math.Cos(an), v45.Y + 6 * Math.Sin(an));
            Vector2 v55 = new Vector2(v54.X, v45.Y);
            Vector2 v56 = new Vector2(v45.X, v45.Y - 2);
            Vector2 v57 = new Vector2(v56.X + 1.0718, v56.Y);
            //图三
            Vector2 v58 = new Vector2(v1.X + 55.76, v1.Y);
            Vector2 v59 = new Vector2(v2.X + 50, v2.Y);
            Vector2 v60 = new Vector2(v3.X + 39.73, v3.Y);
            Vector2 v61 = new Vector2(v4.X + 39.63, v4.Y);
            Vector2 v62 = new Vector2(v5.X + 41.34, v5.Y);
            Vector2 v63 = new Vector2(v6.X + 39.02, v6.Y);
            Vector2 v64 = new Vector2(v63.X, v63.Y + 2.4036);
            Vector2 v65 = new Vector2(v8.X + 50, v8.Y);
            Vector2 v66 = new Vector2(v9.X + 61, v9.Y);
            Vector2 v67 = new Vector2(v66.X, v66.Y - 2);
            Vector2 v68 = new Vector2(v11.X + 56, v11.Y);
            Vector2 v69 = new Vector2(v12.X + 53.23, v12.Y);
            Vector2 v70 = new Vector2(v13.X + 55.96, v13.Y);
            Vector2 v71 = new Vector2(v60.X - 10 * Math.Cos(psirr), v60.Y + 10 * Math.Sin(psirr));
            Vector2 v72 = new Vector2(v71.X + 2.9, v71.Y + 0.7765);
            Vector2 v73 = new Vector2(v72.X - 1.3964, v72.Y + 1.4094);
            Vector2 v74 = new Vector2(v73.X - 0.7071, v73.Y + 0.7071);
            Vector2 v75 = new Vector2(v61.X, v61.Y + 7.3968);
            Vector2 v76 = new Vector2(v71.X, v71.Y - 8);
            //图三内部虚线
            Vector2 v77 = new Vector2(v31.X + 61, v31.Y);
            Vector2 v78 = new Vector2(v32.X + 56, v32.Y);
            Vector2 v79 = new Vector2(v33.X + 52.23, v33.Y);
            Vector2 v80 = new Vector2(v34.X + 54.97, v34.Y);
            Vector2 v81 = new Vector2(v35.X + 50, v35.Y);
            Vector2 v82 = new Vector2(v36.X + 40.69, v36.Y);
            Vector2 v83 = new Vector2(v37.X + 42.31, v37.Y);
            Vector2 v84 = new Vector2(v38.X + 39.02, v38.Y);
            //作图
            //图一
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.2, contour);
            Vector2[] Line2 = { v3, v2 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes[0].Bulge = -0.0181;
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            Vector2[] Line3 = { v4, v5 };
            fun.drawBLine(dxf, Line3, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes.Add(new LwPolylineVertex(v6));
            Arc2.Vertexes[0].Bulge = -0.351;
            fun.PolyFill(dxf, Arc2, 0.2, contour);
            Vector2[] Line4 = { v6, v7 };
            fun.drawBLine(dxf, Line4, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v7));
            Arc3.Vertexes.Add(new LwPolylineVertex(v8));
            Arc3.Vertexes[0].Bulge = 0.1918;
            fun.PolyFill(dxf, Arc3, 0.1, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v9));
            Arc4.Vertexes.Add(new LwPolylineVertex(v8));
            Arc4.Vertexes[0].Bulge = 0.1918;
            fun.PolyFill(dxf, Arc4, 0.1, contour);
            Vector2[] Line5 = { v9, v10 };
            fun.drawBLine(dxf, Line5, 0.2, contour);
            Vector2[] Line6 = { v11, v10 };
            fun.drawBLine(dxf, Line6, 0.2, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v11));
            Arc5.Vertexes.Add(new LwPolylineVertex(v12));
            Arc5.Vertexes[0].Bulge = -0.2398;
            fun.PolyFill(dxf, Arc5, 0.2, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v13));
            Arc6.Vertexes.Add(new LwPolylineVertex(v1));
            Arc6.Vertexes[0].Bulge = -0.0181;
            fun.PolyFill(dxf, Arc6, 0.2, contour);
            Vector2[] Line7 = { v13, v12 };
            fun.drawBLine(dxf, Line7, 0.2, contour);
            //上右图
            Vector2[] Line8 = { v14, v15 };
            fun.drawBLine(dxf, Line8, 0.2, contour);
            Vector2[] Line9 = { v15, v16 };
            fun.drawBLine(dxf, Line9, 0.2, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v16));
            Arc7.Vertexes.Add(new LwPolylineVertex(v17));
            Arc7.Vertexes[0].Bulge = -0.4208;
            fun.PolyFill(dxf, Arc7, 0.1, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v14));
            Arc8.Vertexes.Add(new LwPolylineVertex(v17));
            Arc8.Vertexes[0].Bulge = -0.211;
            fun.PolyFill(dxf, Arc8, 0.1, contour);
            //上左图
            Vector2[] Line10 = { v18, v19 };
            fun.drawBLine(dxf, Line10, 0.2, contour);
            Vector2[] Line11 = { v20, v19 };
            fun.drawBLine(dxf, Line11, 0.2, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v20));
            Arc9.Vertexes.Add(new LwPolylineVertex(v21));
            Arc9.Vertexes[0].Bulge = 0.4208;
            fun.PolyFill(dxf, Arc9, 0.1, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v18));
            Arc10.Vertexes.Add(new LwPolylineVertex(v21));
            Arc10.Vertexes[0].Bulge = 0.211;
            fun.PolyFill(dxf, Arc10, 0.1, contour);
            //图一右
            Vector2[] Line12 = { v22, v23 };
            fun.drawBLine(dxf, Line12, 0.2, contour);
            Vector2[] Line13 = { v23, v24 };
            fun.drawBLine(dxf, Line13, 0.2, contour);
            Vector2[] Line14 = { v25, v24 };
            fun.drawBLine(dxf, Line14, 0.2, contour);
            Vector2[] Line15 = { v25, v26 };
            fun.drawBLine(dxf, Line15, 0.1, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v22));
            Arc16.Vertexes.Add(new LwPolylineVertex(v26));
            Arc16.Vertexes[0].Bulge = -0.3101;
            fun.PolyFill(dxf, Arc16, 0.1, contour);
            //图一和上图尺寸线
            Vector2[] Line17 = { v12, v15 };
            fun.drawBLine(dxf, Line17, 0, skviewdimensioning);
            Vector2[] Line18 = { v19, v5 };
            fun.drawBLine(dxf, Line18, 0, skviewdimensioning);
            Vector2[] Line19 = { v3, v27 };
            fun.drawBLine(dxf, Line19, 0, skviewdimensioning);
            Vector2[] Line20 = { v28, v27 };
            fun.drawBLine(dxf, Line20, 0, skviewdimensioning);
            Vector2[] Line21 = { v28, v24 };
            fun.drawBLine(dxf, Line21, 0, skviewdimensioning);
            Vector2[] Line22 = { v29, v4 };
            fun.drawBLine(dxf, Line22, 0, skviewdimensioning);
            Vector2[] Line23 = { v13, v11 };
            fun.drawBLine(dxf, Line23, 0, skviewdimensioning);
            Vector2[] Line24 = { v2, v30 };
            fun.drawBLine(dxf, Line24, 0, skviewdimensioning);
            //图一内部虚线
            Vector2[] Line25 = { v31, v32 };
            fun.drawPlinetype(dxf, Line25, 0.15, centre, Linetype.Dashed);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v32));
            Arc17.Vertexes.Add(new LwPolylineVertex(v33));
            Arc17.Vertexes[0].Bulge = -0.2398;
            Arc17.Layer = centre;
            Arc17.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc17);
            Vector2[] Line26 = { v33, v34 };
            fun.drawPlinetype(dxf, Line26, 0.15, centre, Linetype.Dashed);
            Vector2[] Line27 = { v35, v34 };
            fun.drawPlinetype(dxf, Line27, 0.15, centre, Linetype.Dashed);
            Vector2[] Line28 = { v35, v36 };
            fun.drawPlinetype(dxf, Line28, 0.15, centre, Linetype.Dashed);
            Vector2[] Line29 = { v37, v36 };
            fun.drawPlinetype(dxf, Line29, 0.15, centre, Linetype.Dashed);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v37));
            Arc18.Vertexes.Add(new LwPolylineVertex(v38));
            Arc18.Vertexes[0].Bulge = -0.351;
            Arc18.Layer = centre;
            Arc18.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc18);
            //直角
            Vector2[] Line30 = { v39, v40 };
            fun.drawBLine(dxf, Line30, 0, skviewdimensioning);
            Vector2[] Line31 = { v41, v40 };
            fun.drawBLine(dxf, Line31, 0, skviewdimensioning);
            Vector2[] Line32 = { v42, v43 };
            fun.drawBLine(dxf, Line32, 0, skviewdimensioning);
            Vector2[] Line33 = { v44, v43 };
            fun.drawBLine(dxf, Line33, 0, skviewdimensioning);
            //图二
            Vector2[] Line34 = { v45, v46 };
            fun.drawBLine(dxf, Line34, 0.2, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v46));
            Arc19.Vertexes.Add(new LwPolylineVertex(v47));
            Arc19.Vertexes[0].Bulge = -0.3699;
            fun.PolyFill(dxf, Arc19, 0.2, contour);
            Vector2[] Line35 = { v47, v48 };
            fun.drawBLine(dxf, Line35, 0.2, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v48));
            Arc20.Vertexes.Add(new LwPolylineVertex(v49));
            Arc20.Vertexes[0].Bulge = -0.19;
            fun.PolyFill(dxf, Arc20, 0.1, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v50));
            Arc21.Vertexes.Add(new LwPolylineVertex(v49));
            Arc21.Vertexes[0].Bulge = -0.1104;
            fun.PolyFill(dxf, Arc21, 0.1, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v50));
            Arc22.Vertexes.Add(new LwPolylineVertex(v51));
            Arc22.Vertexes[0].Bulge = 0.5;
            fun.PolyFill(dxf, Arc22, 0.1, contour);
            LwPolyline Arc23 = new LwPolyline();
            Arc23.Vertexes.Add(new LwPolylineVertex(v52));
            Arc23.Vertexes.Add(new LwPolylineVertex(v51));
            Arc23.Vertexes[0].Bulge = 0.2039;
            fun.PolyFill(dxf, Arc23, 0.1, contour);
            Vector2[] Line36 = { v52, v53 };
            fun.drawBLine(dxf, Line36, 0.2, contour);
            Vector2[] Line37 = { v45, v53 };
            fun.drawBLine(dxf, Line37, 0.2, contour);
            Vector2[] Line39 = { v45, v55 };
            fun.drawBLine(dxf, Line39, 0, skviewdimensioning);
            Vector2[] Line40 = { v45, v56 };
            fun.drawBLine(dxf, Line40, 0, skviewdimensioning);
            Vector2[] Line41 = { v45, v57 };
            fun.drawBLine(dxf, Line41, 0, skviewdimensioning);
            //图三
            Vector2[] Line42 = { v58, v59 };
            fun.drawBLine(dxf, Line42, 0.2, contour);
            Vector2[] Line43 = { v60, v59 };
            fun.drawBLine(dxf, Line43, 0.2, contour);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v60));
            Arc24.Vertexes.Add(new LwPolylineVertex(v61));
            Arc24.Vertexes[0].Bulge = 0.0181;
            fun.PolyFill(dxf, Arc24, 0.2, contour);
            Vector2[] Line44 = { v61, v62 };
            fun.drawBLine(dxf, Line44, 0.2, contour);
            LwPolyline Arc25 = new LwPolyline();
            Arc25.Vertexes.Add(new LwPolylineVertex(v62));
            Arc25.Vertexes.Add(new LwPolylineVertex(v63));
            Arc25.Vertexes[0].Bulge = 0.351;
            fun.PolyFill(dxf, Arc25, 0.2, contour);
            Vector2[] Line45 = { v63, v64 };
            fun.drawBLine(dxf, Line45, 0.2, contour);
            LwPolyline Arc26 = new LwPolyline();
            Arc26.Vertexes.Add(new LwPolylineVertex(v64));
            Arc26.Vertexes.Add(new LwPolylineVertex(v65));
            Arc26.Vertexes[0].Bulge = -0.1918;
            fun.PolyFill(dxf, Arc26, 0.1, contour);
            LwPolyline Arc27 = new LwPolyline();
            Arc27.Vertexes.Add(new LwPolylineVertex(v66));
            Arc27.Vertexes.Add(new LwPolylineVertex(v65));
            Arc27.Vertexes[0].Bulge = -0.1918;
            fun.PolyFill(dxf, Arc27, 0.1, contour);
            Vector2[] Line46 = { v66, v67 };
            fun.drawBLine(dxf, Line46, 0.2, contour);
            Vector2[] Line47 = { v68, v67 };
            fun.drawBLine(dxf, Line47, 0.2, contour);
            LwPolyline Arc28 = new LwPolyline();
            Arc28.Vertexes.Add(new LwPolylineVertex(v68));
            Arc28.Vertexes.Add(new LwPolylineVertex(v69));
            Arc28.Vertexes[0].Bulge = 0.2398;
            fun.PolyFill(dxf, Arc28, 0.2, contour);
            LwPolyline Arc29 = new LwPolyline();
            Arc29.Vertexes.Add(new LwPolylineVertex(v70));
            Arc29.Vertexes.Add(new LwPolylineVertex(v58));
            Arc29.Vertexes[0].Bulge = 0.0181;
            fun.PolyFill(dxf, Arc29, 0.2, contour);
            Vector2[] Line48 = { v69, v70 };
            fun.drawBLine(dxf, Line48, 0.2, contour);
            Vector2[] Line49 = { v60, v71 };
            fun.drawBLine(dxf, Line49, 0, skviewdimensioning);
            Vector2[] Line50 = { v72, v71 };
            fun.drawBLine(dxf, Line50, 0.2, contour);
            LwPolyline Arc30 = new LwPolyline();
            Arc30.Vertexes.Add(new LwPolylineVertex(v72));
            Arc30.Vertexes.Add(new LwPolylineVertex(v73));
            Arc30.Vertexes[0].Bulge = 0.3243;
            fun.PolyFill(dxf, Arc30, 0.1, contour);
            Vector2[] Line51 = { v73, v74 };
            fun.drawBLine(dxf, Line51, 0.1, contour);
            Vector2[] Line52 = { v71, v74 };
            fun.drawBLine(dxf, Line52, 0.2, contour);
            Vector2[] Line53 = { v61, v75 };
            fun.drawBLine(dxf, Line53, 0, skviewdimensioning);
            Vector2[] Line54 = { v68, v70 };
            fun.drawBLine(dxf, Line54, 0, skviewdimensioning);
            Vector2[] Line55 = { v59, v76 };
            fun.drawBLine(dxf, Line55, 0, skviewdimensioning);
            //图三内部虚线
            Vector2[] Line56 = { v77, v78 };
            fun.drawPlinetype(dxf, Line56, 0.15, centre, Linetype.Dashed);
            LwPolyline Arc31 = new LwPolyline();
            Arc31.Vertexes.Add(new LwPolylineVertex(v78));
            Arc31.Vertexes.Add(new LwPolylineVertex(v79));
            Arc31.Vertexes[0].Bulge = 0.2398;
            Arc31.Layer = centre;
            Arc31.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc31);
            Vector2[] Line57 = { v79, v80 };
            fun.drawPlinetype(dxf, Line57, 0.15, centre, Linetype.Dashed);
            Vector2[] Line58 = { v81, v80 };
            fun.drawPlinetype(dxf, Line58, 0.15, centre, Linetype.Dashed);
            Vector2[] Line59 = { v81, v82 };
            fun.drawPlinetype(dxf, Line59, 0.15, centre, Linetype.Dashed);
            Vector2[] Line60 = { v83, v82 };
            fun.drawPlinetype(dxf, Line60, 0.15, centre, Linetype.Dashed);
            LwPolyline Arc32 = new LwPolyline();
            Arc32.Vertexes.Add(new LwPolylineVertex(v83));
            Arc32.Vertexes.Add(new LwPolylineVertex(v84));
            Arc32.Vertexes[0].Bulge = 0.351;
            Arc32.Layer = centre;
            Arc32.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc32);
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 3;
            //图一和上图标注
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v15, v12), new Line(v15, v14), offset, dimensionStyle);
            angdim1.UserText = "ANL  ";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v19, v18), new Line(v19, v5), offset, dimensionStyle);
            angdim2.UserText = "ANR  ";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v24, v28), new Line(v24, v23), offset, dimensionStyle);
            angdim3.UserText = "AN  ";
            dxf.AddEntity(angdim3);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v4, v5), new Line(v4, v29), offset + 5, dimensionStyle);
            angdim4.UserText = "RAR ";
            dxf.AddEntity(angdim4);
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v13, v11), new Line(v13, v12), offset + 5, dimensionStyle);
            angdim5.UserText = "RAL ";
            dxf.AddEntity(angdim5);
            LinearDimension dim1 = new LinearDimension(new Line(v1, v11), offset, 90, dimensionStyle);
            dim1.UserText = "CDX ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v13, v4), offset, 180, dimensionStyle);
            dim2.UserText = "CW ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v13, v2), offset, 180, dimensionStyle);
            dim3.UserText = "CF ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v13, v10), offset, 180, dimensionStyle);
            dim4.UserText = "PDX ";
            dxf.AddEntity(dim4);
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v2, v30), new Line(v2, v3), offset + 5, dimensionStyle);
            angdim6.UserText = "PSIRR ";
            dxf.AddEntity(angdim6);
            //图二尺寸
            Angular2LineDimension angdim7 = new Angular2LineDimension(new Line(v45, v53), new Line(v45, v55), offset + 3, dimensionStyle);
            angdim7.UserText = "AN ";
            dxf.AddEntity(angdim7);
            LinearDimension dim5 = new LinearDimension(new Line(v45, v47), offset, 270, dimensionStyle);
            dim5.UserText = "LBB ";
            dxf.AddEntity(dim5);
            Angular2LineDimension angdim8 = new Angular2LineDimension(new Line(v45, v56), new Line(v45, v57), offset + 3, dimensionStyle);
            angdim8.UserText = "GAN ";
            dxf.AddEntity(angdim8);
            //图三尺寸
            LinearDimension dim6 = new LinearDimension(new Line(v58, v59), offset - 2, 180, dimensionStyle);
            dim6.UserText = "CF ";
            dxf.AddEntity(dim6);
            LinearDimension dim7 = new LinearDimension(new Line(v58, v60), offset + 2, 180, dimensionStyle);
            dim7.UserText = "CW ";
            dxf.AddEntity(dim7);
            LinearDimension dim8 = new LinearDimension(new Line(v58, v63), offset + 10, 180, dimensionStyle);
            dim8.UserText = "PDX ";
            dxf.AddEntity(dim8);
            LinearDimension dim9 = new LinearDimension(new Line(v68, v70), offset, 270, dimensionStyle);
            dim9.UserText = "CDX ";
            dxf.AddEntity(dim9);
            Angular2LineDimension angdim9 = new Angular2LineDimension(new Line(v59, v76), new Line(v59, v60), offset, dimensionStyle);
            angdim9.UserText = "PSIRL ";
            dxf.AddEntity(angdim9);
            Angular2LineDimension angdim10 = new Angular2LineDimension(new Line(v71, v72), new Line(v71, v60), offset, dimensionStyle);
            angdim10.UserText = "";
            dxf.AddEntity(angdim10);
            Angular2LineDimension angdim11 = new Angular2LineDimension(new Line(v61, v75), new Line(v61, v62), offset + 8, dimensionStyle);
            angdim11.UserText = "RAL";
            dxf.AddEntity(angdim11);
            Angular2LineDimension angdim12 = new Angular2LineDimension(new Line(v70, v69), new Line(v70, v68), offset + 6, dimensionStyle);
            angdim12.UserText = "RAR";
            dxf.AddEntity(angdim12);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF5(Dictionary<string, Object> data)//ISO 29014-2图片F.5
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层            
            //作图
            //参数
            //图一和上图,图二坐标
            double pi = Math.PI;
            double cw = 6.93;
            double cfd = 3.46;
            double pdx = 4.44;
            double ral = 10 * pi / 180;
            double rar = 10 * pi / 180;
            double pal = 60 * pi / 180;
            double par = 60 * pi / 180;
            double an = 25 * pi / 180;
            double anl = 25 * pi / 180;
            double anr = 25 * pi / 180;
            double cf = 2;
            double An = 15 * pi / 180;
            double lbb = 10;
            double gan = 15 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //坐标
            //图一
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + cfd, v1.Y + cfd * Math.Tan(30 * pi / 180));
            Vector2 v3 = new Vector2(v2.X - cw, v2.Y);
            Vector2 v4 = new Vector2(v2.X - 1.21, v2.Y + 6.88 * Math.Cos(rar));
            Vector2 v5 = new Vector2(-v4.X, v4.Y);
            Vector2 v6 = new Vector2(v2.X, v2.Y + 8.78);
            Vector2 v7 = new Vector2(-v6.X, v6.Y);
            Vector2 v8 = new Vector2(v6.X + pdx - cfd, v1.Y + 10.8752);
            Vector2 v9 = new Vector2(-v8.X, v8.Y);
            Vector2 v10 = new Vector2(v8.X, v8.Y + 1.5);
            Vector2 v11 = new Vector2(v9.X, v9.Y + 1.5);
            Vector2 v12 = new Vector2(v1.X, v1.Y + 12.6);
            Vector2 v13 = new Vector2(v1.X, v1.Y - 3);
            Vector2 v14 = new Vector2(v12.X, v12.Y + 3);
            //图一内部虚线
            Vector2 v15 = new Vector2(v9.X, v9.Y + 0.5);
            Vector2 v16 = new Vector2(-v15.X, v15.Y);
            Vector2 v17 = new Vector2(v7.X, v7.Y + 0.5);
            Vector2 v18 = new Vector2(-v17.X, v17.Y);
            Vector2 v19 = new Vector2(v5.X + 0.5 * Math.Cos(ral), v5.Y - 0.5 * Math.Sin(ral));
            Vector2 v20 = new Vector2(-v19.X, v19.Y);
            Vector2 v21 = new Vector2(v3.X + 0.5624, v3.Y + 0.233);
            Vector2 v22 = new Vector2(-v21.X, v21.Y);
            Vector2 v23 = new Vector2(v1.X, v1.Y + 0.5);
            //上图
            Vector2 v24 = new Vector2(v1.X + 1, v1.Y + 26.974);
            Vector2 v25 = new Vector2(-v24.X, v24.Y);
            Vector2 v26 = new Vector2(v24.X + 1.0038, v24.Y - 3.87);
            Vector2 v27 = new Vector2(-v26.X, v26.Y);
            Vector2 v28 = new Vector2(v26.X + 1.5085, v26.Y + 1.4261);
            Vector2 v29 = new Vector2(-v28.X, v28.Y);
            Vector2 v30 = new Vector2(v28.X + 1.3428, v28.Y + 1.38);
            Vector2 v31 = new Vector2(-v30.X, v30.Y);
            //图一左右
            Vector2 v32 = new Vector2(v1.X + 18 * Math.Cos(30 * pi / 180), v1.Y + 18 * Math.Sin(30 * pi / 180));
            Vector2 v33 = new Vector2(-v32.X, v32.Y);
            Vector2 v34 = new Vector2(v32.X - 2.2943, v32.Y + 3.2766);
            Vector2 v35 = new Vector2(-v34.X, v34.Y);
            Vector2 v36 = new Vector2(v34.X - 0.846, v34.Y - 1.8);
            Vector2 v37 = new Vector2(-v36.X, v36.Y);
            Vector2 v38 = new Vector2(v36.X - 0.8445, v36.Y - 1.8213);
            Vector2 v39 = new Vector2(-v38.X, v38.Y);
            //图二
            Vector2 v40 = new Vector2(v1.X + 20, v1.Y);
            Vector2 v41 = new Vector2(v40.X + cf, v40.Y);
            Vector2 v42 = new Vector2(v40.X + cfd, v40.Y + (cfd - 1.5) * Math.Tan(pi / 2 - par));
            Vector2 v43 = new Vector2(v42.X - 0.2605, v42.Y + 1.4772);
            Vector2 v44 = new Vector2(v40.X, v40.Y + 2.57);
            Vector2 v45 = new Vector2(v44.X - 1.3379, v43.Y);
            Vector2 v46 = new Vector2(v42.X - 5, v42.Y);
            Vector2 v47 = new Vector2(v40.X, v40.Y - 3);
            Vector2 v48 = new Vector2(v40.X, v40.Y + 5);
            Vector2 v49 = new Vector2(v41.X, v41.Y + 5);
            Vector2 v50 = new Vector2(v41.X, v41.Y - 3);
            Vector2 v51 = new Vector2(v45.X - 1, v45.Y);
            //图二内部虚线
            Vector2 v52 = new Vector2(v45.X + 0.3454, v45.Y - 0.2058);
            Vector2 v53 = new Vector2(v52.X - 0.15, v52.Y - 1.0775);
            Vector2 v54 = new Vector2(v40.X, v40.Y + 0.3759);
            Vector2 v55 = new Vector2(v41.X, v54.Y);
            Vector2 v56 = new Vector2(v42.X - 0.4159, v42.Y + 0.1939);
            Vector2 v57 = new Vector2(v43.X - 0.3926, v43.Y + 0.0622);
            //图三
            Vector2 v58 = new Vector2(v41.X + 15, v41.Y);
            Vector2 v59 = new Vector2(v58.X - 8 * Math.Sin(gan), v58.Y + 8 * Math.Cos(gan));
            Vector2 v60 = new Vector2(v58.X, v58.Y + lbb);
            Vector2 v61 = new Vector2(v60.X, v60.Y + 1);
            Vector2 v62 = new Vector2(v61.X - 3.8637, v61.Y - 0.36);
            Vector2 v63 = new Vector2(v62.X - 1.8984, v62.Y - 3.72);
            Vector2 v64 = new Vector2(v63.X + 0.1663, v63.Y - 4.8855);
            Vector2 v65 = new Vector2(v64.X + 2 * Math.Cos(30 * pi / 180), v64.Y - 2 * Math.Sin(30 * pi / 180));
            Vector2 v66 = new Vector2(v58.X, v58.Y - 2);
            Vector2 v67 = new Vector2(v66.X + 2 * Math.Tan(gan), v66.Y);
            Vector2 v68 = new Vector2(v65.X, v58.Y);
            //作图
            //图一
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.2, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            Vector2[] Line3 = { v2, v4 };
            fun.drawBLine(dxf, Line3, 0.2, contour);
            Vector2[] Line4 = { v5, v3 };
            fun.drawBLine(dxf, Line4, 0.2, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            Arc1.Vertexes[0].Bulge = -0.218;
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes.Add(new LwPolylineVertex(v7));
            Arc2.Vertexes[0].Bulge = 0.218;
            fun.PolyFill(dxf, Arc2, 0.2, contour);
            Vector2[] Line5 = { v6, v8 };
            fun.drawBLine(dxf, Line5, 0.2, contour);
            Vector2[] Line6 = { v7, v9 };
            fun.drawBLine(dxf, Line6, 0.2, contour);
            Vector2[] Line7 = { v8, v10 };
            fun.drawBLine(dxf, Line7, 0.2, contour);
            Vector2[] Line8 = { v11, v9 };
            fun.drawBLine(dxf, Line8, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v10));
            Arc3.Vertexes.Add(new LwPolylineVertex(v12));
            Arc3.Vertexes[0].Bulge = 0.2513;
            fun.PolyFill(dxf, Arc3, 0.1, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v11));
            Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            Arc4.Vertexes[0].Bulge = 0.20;
            fun.PolyFill(dxf, Arc4, 0.1, contour);
            Vector2[] Line9 = { v13, v14 };
            fun.drawPlinetype(dxf, Line9, 0.15, centre, Linetype.Dashed);
            Vector2[] Line10 = { v15, v17 };
            fun.drawPlinetype(dxf, Line10, 0.15, refin, Linetype.Dashed);
            Vector2[] Line11 = { v16, v18 };
            fun.drawPlinetype(dxf, Line11, 0.15, refin, Linetype.Dashed);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v17));
            Arc5.Vertexes.Add(new LwPolylineVertex(v19));
            Arc5.Vertexes[0].Bulge = -0.218;
            Arc5.Layer = refin;
            Arc5.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc5);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            Arc6.Vertexes.Add(new LwPolylineVertex(v20));
            Arc6.Vertexes[0].Bulge = 0.218;
            Arc6.Layer = refin;
            Arc6.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc6);
            Vector2[] Line12 = { v19, v21 };
            fun.drawPlinetype(dxf, Line12, 0.15, refin, Linetype.Dashed);
            Vector2[] Line13 = { v20, v22 };
            fun.drawPlinetype(dxf, Line13, 0.15, refin, Linetype.Dashed);
            Vector2[] Line14 = { v21, v23 };
            fun.drawPlinetype(dxf, Line14, 0.15, refin, Linetype.Dashed);
            Vector2[] Line15 = { v22, v23 };
            fun.drawPlinetype(dxf, Line15, 0.15, refin, Linetype.Dashed);
            //上图
            Vector2[] Line16 = { v5, v24 };
            fun.drawBLine(dxf, Line16, 0, skviewdimensioning);
            Vector2[] Line17 = { v4, v25 };
            fun.drawBLine(dxf, Line17, 0, skviewdimensioning);
            Vector2[] Line18 = { v24, v26 };
            fun.drawBLine(dxf, Line18, 0.2, contour);
            Vector2[] Line19 = { v25, v27 };
            fun.drawBLine(dxf, Line19, 0.2, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v26));
            Arc7.Vertexes.Add(new LwPolylineVertex(v28));
            Arc7.Vertexes[0].Bulge = -0.28;
            fun.PolyFill(dxf, Arc7, 0.1, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v27));
            Arc8.Vertexes.Add(new LwPolylineVertex(v29));
            Arc8.Vertexes[0].Bulge = 0.28;
            fun.PolyFill(dxf, Arc8, 0.1, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v28));
            Arc9.Vertexes.Add(new LwPolylineVertex(v30));
            Arc9.Vertexes[0].Bulge = 0.3055;
            fun.PolyFill(dxf, Arc9, 0.1, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v29));
            Arc10.Vertexes.Add(new LwPolylineVertex(v31));
            Arc10.Vertexes[0].Bulge = -0.3055;
            fun.PolyFill(dxf, Arc10, 0.1, contour);
            Vector2[] Line20 = { v30, v24 };
            fun.drawBLine(dxf, Line20, 0.2, contour);
            Vector2[] Line21 = { v31, v25 };
            fun.drawBLine(dxf, Line21, 0.2, contour);
            //图一左右
            Vector2[] Line22 = { v32, v34 };
            fun.drawBLine(dxf, Line22, 0.2, contour);
            Vector2[] Line23 = { v33, v35 };
            fun.drawBLine(dxf, Line23, 0.2, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v34));
            Arc11.Vertexes.Add(new LwPolylineVertex(v36));
            Arc11.Vertexes[0].Bulge = 0.3055;
            fun.PolyFill(dxf, Arc11, 0.1, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v35));
            Arc12.Vertexes.Add(new LwPolylineVertex(v37));
            Arc12.Vertexes[0].Bulge = -0.3055;
            fun.PolyFill(dxf, Arc12, 0.1, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v36));
            Arc13.Vertexes.Add(new LwPolylineVertex(v38));
            Arc13.Vertexes[0].Bulge = -0.28;
            fun.PolyFill(dxf, Arc13, 0.1, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v37));
            Arc14.Vertexes.Add(new LwPolylineVertex(v39));
            Arc14.Vertexes[0].Bulge = 0.28;
            fun.PolyFill(dxf, Arc14, 0.1, contour);
            Vector2[] Line24 = { v32, v38 };
            fun.drawBLine(dxf, Line24, 0.2, contour);
            Vector2[] Line25 = { v33, v39 };
            fun.drawBLine(dxf, Line25, 0.2, contour);
            Vector2[] Line26 = { v2, v32 };
            fun.drawBLine(dxf, Line26, 0, skviewdimensioning);
            Vector2[] Line27 = { v3, v33 };
            fun.drawBLine(dxf, Line27, 0, skviewdimensioning);
            //图二
            Vector2[] Line28 = { v40, v41 };
            fun.drawBLine(dxf, Line28, 0.2, contour);
            Vector2[] Line29 = { v42, v41 };
            fun.drawBLine(dxf, Line29, 0.2, contour);
            Vector2[] Line30 = { v42, v43 };
            fun.drawBLine(dxf, Line30, 0.2, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v43));
            Arc15.Vertexes.Add(new LwPolylineVertex(v44));
            Arc15.Vertexes[0].Bulge = 0.18;
            fun.PolyFill(dxf, Arc15, 0.1, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v45));
            Arc16.Vertexes.Add(new LwPolylineVertex(v44));
            Arc16.Vertexes[0].Bulge = 0.205;
            fun.PolyFill(dxf, Arc16, 0.1, contour);
            Vector2[] Line31 = { v45, v46 };
            fun.drawBLine(dxf, Line31, 0.2, contour);
            Vector2[] Line32 = { v40, v46 };
            fun.drawBLine(dxf, Line32, 0.2, contour);
            Vector2[] Line33 = { v47, v48 };
            fun.drawBLine(dxf, Line33, 0, skviewdimensioning);
            Vector2[] Line34 = { v49, v50 };
            fun.drawBLine(dxf, Line34, 0, skviewdimensioning);
            Vector2[] Line35 = { v52, v53 };
            fun.drawPlinetype(dxf, Line35, 0.15, refin, Linetype.Dashed);
            Vector2[] Line36 = { v54, v53 };
            fun.drawPlinetype(dxf, Line36, 0.15, refin, Linetype.Dashed);
            Vector2[] Line37 = { v54, v55 };
            fun.drawPlinetype(dxf, Line37, 0.15, refin, Linetype.Dashed);
            Vector2[] Line38 = { v56, v55 };
            fun.drawPlinetype(dxf, Line38, 0.15, refin, Linetype.Dashed);
            Vector2[] Line39 = { v56, v57 };
            fun.drawPlinetype(dxf, Line39, 0.15, refin, Linetype.Dashed);
            //图三
            Vector2[] Line40 = { v58, v59 };
            fun.drawBLine(dxf, Line40, 0.2, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v59));
            Arc17.Vertexes.Add(new LwPolylineVertex(v60));
            Arc17.Vertexes[0].Bulge = -0.3486;
            fun.PolyFill(dxf, Arc17, 0.2, contour);
            Vector2[] Line41 = { v60, v61 };
            fun.drawBLine(dxf, Line41, 0.2, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v61));
            Arc18.Vertexes.Add(new LwPolylineVertex(v62));
            Arc18.Vertexes[0].Bulge = -0.184;
            fun.PolyFill(dxf, Arc18, 0.2, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v63));
            Arc19.Vertexes.Add(new LwPolylineVertex(v62));
            Arc19.Vertexes[0].Bulge = -0.82;
            fun.PolyFill(dxf, Arc19, 0.2, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v63));
            Arc20.Vertexes.Add(new LwPolylineVertex(v64));
            Arc20.Vertexes[0].Bulge = -0.4431;
            fun.PolyFill(dxf, Arc20, 0.2, contour);
            Vector2[] Line42 = { v64, v65 };
            fun.drawBLine(dxf, Line42, 0.2, contour);
            Vector2[] Line43 = { v58, v65 };
            fun.drawBLine(dxf, Line43, 0.2, contour);
            Vector2[] Line44 = { v58, v66 };
            fun.drawBLine(dxf, Line44, 0, skviewdimensioning);
            Vector2[] Line45 = { v58, v67 };
            fun.drawBLine(dxf, Line45, 0, skviewdimensioning);
            Vector2[] Line46 = { v58, v68 };
            fun.drawBLine(dxf, Line46, 0, skviewdimensioning);
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 3;
            //图一标注
            LinearDimension dim1 = new LinearDimension(new Line(v1, v7), offset, 90, dimensionStyle);
            dim1.UserText = "CDX ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v1, v7), offset + 3, 180, dimensionStyle);
            dim2.UserText = "CFD ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v3, v6), offset + 8, 180, dimensionStyle);
            dim3.UserText = "CW ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v1, v9), offset + 12, 180, dimensionStyle);
            dim4.UserText = "PDX ";
            dxf.AddEntity(dim4);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v2, v6), new Line(v2, v4), offset + 6, dimensionStyle);
            angdim1.UserText = "RAR  ";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v3, v5), new Line(v3, v7), offset + 6, dimensionStyle);
            angdim2.UserText = "RAL  ";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v2, v4), new Line(v2, v32), offset + 12, dimensionStyle);
            angdim3.UserText = "PAR  ";
            dxf.AddEntity(angdim3);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v3, v5), new Line(v3, v33), offset + 12, dimensionStyle);
            angdim4.UserText = "PAL  ";
            dxf.AddEntity(angdim4);
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v32, v38), new Line(v32, v2), offset, dimensionStyle);
            angdim5.UserText = "AN  ";
            dxf.AddEntity(angdim5);
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v33, v39), new Line(v33, v3), offset, dimensionStyle);
            angdim6.UserText = "AN  ";
            dxf.AddEntity(angdim6);
            Angular2LineDimension angdim7 = new Angular2LineDimension(new Line(v24, v26), new Line(v24, v5), offset, dimensionStyle);
            angdim7.UserText = "ANR ";
            dxf.AddEntity(angdim7);
            Angular2LineDimension angdim8 = new Angular2LineDimension(new Line(v25, v27), new Line(v25, v4), offset, dimensionStyle);
            angdim8.UserText = "ANL ";
            dxf.AddEntity(angdim8);
            //图二标注
            Angular2LineDimension angdim9 = new Angular2LineDimension(new Line(v40, v48), new Line(v40, v46), offset, dimensionStyle);
            angdim9.UserText = "PAL";
            dxf.AddEntity(angdim9);
            Angular2LineDimension angdim10 = new Angular2LineDimension(new Line(v41, v49), new Line(v41, v42), offset, dimensionStyle);
            angdim10.UserText = "PAR";
            dxf.AddEntity(angdim10);
            LinearDimension dim5 = new LinearDimension(new Line(v40, v41), offset, 180, dimensionStyle);
            dim5.UserText = "CF";
            dxf.AddEntity(dim5);
            LinearDimension dim6 = new LinearDimension(new Line(v41, v46), offset + 4, 180, dimensionStyle);
            dim6.UserText = "CFD";
            dxf.AddEntity(dim6);
            LinearDimension dim7 = new LinearDimension(new Line(v42, v46), offset + 8, 180, dimensionStyle);
            dim7.UserText = "CW";
            dxf.AddEntity(dim7);
            LinearDimension dim8 = new LinearDimension(new Line(v41, v51), offset + 12, 180, dimensionStyle);
            dim8.UserText = "PDX";
            dxf.AddEntity(dim8);
            //图三标注
            LinearDimension dim9 = new LinearDimension(new Line(v58, v60), offset, 270, dimensionStyle);
            dim9.UserText = "LBB";
            dxf.AddEntity(dim9);
            Angular2LineDimension angdim11 = new Angular2LineDimension(new Line(v58, v66), new Line(v58, v67), offset + 2, dimensionStyle);
            angdim11.UserText = "GAN";
            dxf.AddEntity(angdim11);
            Angular2LineDimension angdim12 = new Angular2LineDimension(new Line(v58, v65), new Line(v58, v68), offset + 2, dimensionStyle);
            angdim12.UserText = "AN";
            dxf.AddEntity(angdim12);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF6(Dictionary<string, Object> data)//ISO 29014-2图片F.6
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层            
            //作图
            //参数
            double pi = Math.PI;
            double pdx = 5.87;
            double cf = 2;
            double cdx = 5.2;
            double pdy = 8;
            double par = 30 * pi / 180;
            double pal = 30 * pi / 180;
            double pna = 60 * pi / 180;
            double anl = 30 * pi / 180;
            double anr = 30 * pi / 180;
            double gan = 15 * pi / 180;
            double lbb = 8;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + cf, v1.Y);
            Vector2 v3 = new Vector2(v2.X + 6 * Math.Cos(pi / 2 - par), v2.Y + 6 * Math.Sin(pi / 2 - par));
            Vector2 v4 = new Vector2(v3.X + 3 * Math.Cos(30 * pi / 180), v3.Y + 3 * Math.Sin(30 * pi / 180));
            Vector2 v5 = new Vector2(v4.X - 2.8774, v4.Y + 1);
            Vector2 v6 = new Vector2(v2.X - pdx, v1.Y + 7.7);
            Vector2 v7 = new Vector2(v6.X, v6.Y - 2);
            Vector2 v8 = new Vector2(v1.X - 6 * Math.Cos(pi / 2 - pal), v1.Y + cdx);
            //内部虚线
            Vector2 v9 = new Vector2(v7.X, v7.Y + 0.5);
            Vector2 v10 = new Vector2(v8.X + 0.5 * Math.Cos(30 * pi / 180), v8.Y + 0.5 * Math.Sin(30 * pi / 180));
            Vector2 v11 = new Vector2(v1.X + 0.5 * Math.Cos(30 * pi / 180), v1.Y + 0.5 * Math.Sin(30 * pi / 180));
            Vector2 v12 = new Vector2(v11.X + 1.134, v11.Y);
            Vector2 v13 = new Vector2(v10.X + 7.05, v10.Y);
            Vector2 v14 = new Vector2(v13.X + 2.7232, v13.Y + 1.5722);
            //上图
            Vector2 v15 = new Vector2(v3.X + 12 * Math.Cos(60 * pi / 180), v3.Y + 12 * Math.Sin(60 * pi / 180));
            Vector2 v16 = new Vector2(v15.X - 19, v15.Y);
            Vector2 v17 = new Vector2(v15.X - 4 * Math.Cos(anr), v15.Y - 4 * Math.Sin(anr));
            Vector2 v18 = new Vector2(v17.X - 12.07, v17.Y);
            Vector2 v19 = new Vector2(v17.X - 0.2009, v17.Y + 2.4865);
            Vector2 v20 = new Vector2(v19.X - 11.67, v19.Y);
            Vector2 v21 = new Vector2(v17.X, v17.Y + 4);
            Vector2 v22 = new Vector2(v18.X, v18.Y + 4);
            //右图
            Vector2 v23 = new Vector2(v2.X + 15, v2.Y);
            Vector2 v24 = new Vector2(v23.X - 6 * Math.Sin(gan), v23.Y + 6 * Math.Cos(gan));
            Vector2 v25 = new Vector2(v23.X, v23.Y + lbb);
            Vector2 v26 = new Vector2(v25.X, v25.Y + 1);
            Vector2 v27 = new Vector2(v23.X - 5.59, v23.Y + 1.76);
            Vector2 v28 = new Vector2(v27.X + 2.5981, v27.Y - 1.5);
            //标注点
            Vector2 v29 = new Vector2(v1.X, v1.Y + 10);
            Vector2 v30 = new Vector2(v7.X, v1.Y - pdy);
            Vector2 v31 = new Vector2(v2.X, v2.Y + 10);
            Vector2 v32 = new Vector2(v1.X + 7.12, v1.Y);
            Vector2 v33 = new Vector2(v23.X, v23.Y - 3);
            Vector2 v34 = new Vector2(v33.X + 3 * Math.Tan(gan), v33.Y);
            Vector2 v35 = new Vector2(v24.X, v23.Y);
            //作图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.2, contour);
            Vector2[] Line2 = { v2, v3 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            Vector2[] Line3 = { v4, v3 };
            fun.drawBLine(dxf, Line3, 0.2, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes[0].Bulge = 0.3949;
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v6));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = 0.21;
            fun.PolyFill(dxf, Arc2, 0.2, contour);
            Vector2[] Line4 = { v6, v7 };
            fun.drawBLine(dxf, Line4, 0.2, contour);
            Vector2[] Line5 = { v8, v7 };
            fun.drawBLine(dxf, Line5, 0.2, contour);
            Vector2[] Line6 = { v8, v1 };
            fun.drawBLine(dxf, Line6, 0.2, contour);
            //内部虚线
            Vector2[] Line7 = { v9, v10 };
            fun.drawPlinetype(dxf, Line7, 0.15, refin, Linetype.Dashed);
            Vector2[] Line8 = { v11, v10 };
            fun.drawPlinetype(dxf, Line8, 0.15, refin, Linetype.Dashed);
            Vector2[] Line9 = { v11, v12 };
            fun.drawPlinetype(dxf, Line9, 0.15, refin, Linetype.Dashed);
            Vector2[] Line10 = { v13, v12 };
            fun.drawPlinetype(dxf, Line10, 0.15, refin, Linetype.Dashed);
            Vector2[] Line11 = { v13, v14 };
            fun.drawPlinetype(dxf, Line11, 0.15, refin, Linetype.Dashed);
            //上图
            Vector2[] Line12 = { v15, v3 };
            fun.drawBLine(dxf, Line12, 0, skviewdimensioning);
            Vector2[] Line13 = { v16, v8 };
            fun.drawBLine(dxf, Line13, 0, skviewdimensioning);
            Vector2[] Line14 = { v15, v17 };
            fun.drawBLine(dxf, Line14, 0.2, contour);
            Vector2[] Line15 = { v16, v18 };
            fun.drawBLine(dxf, Line15, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v17));
            Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            Arc3.Vertexes[0].Bulge = 0.2189;
            fun.PolyFill(dxf, Arc3, 0.1, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v18));
            Arc4.Vertexes.Add(new LwPolylineVertex(v20));
            Arc4.Vertexes[0].Bulge = -0.2189;
            fun.PolyFill(dxf, Arc4, 0.1, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v19));
            Arc5.Vertexes.Add(new LwPolylineVertex(v21));
            Arc5.Vertexes[0].Bulge = -0.33;
            fun.PolyFill(dxf, Arc5, 0.1, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v20));
            Arc6.Vertexes.Add(new LwPolylineVertex(v22));
            Arc6.Vertexes[0].Bulge = 0.33;
            fun.PolyFill(dxf, Arc6, 0.1, contour);
            Vector2[] Line16 = { v15, v21 };
            fun.drawBLine(dxf, Line16, 0.2, contour);
            Vector2[] Line17 = { v16, v22 };
            fun.drawBLine(dxf, Line17, 0.2, contour);
            //右图
            Vector2[] Line18 = { v23, v24 };
            fun.drawBLine(dxf, Line18, 0.2, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v24));
            Arc7.Vertexes.Add(new LwPolylineVertex(v25));
            Arc7.Vertexes[0].Bulge = -0.2858;
            fun.PolyFill(dxf, Arc7, 0.2, contour);
            Vector2[] Line19 = { v25, v26 };
            fun.drawBLine(dxf, Line19, 0.2, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v26));
            Arc8.Vertexes.Add(new LwPolylineVertex(v27));
            Arc8.Vertexes[0].Bulge = 0.4293;
            fun.PolyFill(dxf, Arc8, 0.2, contour);
            Vector2[] Line20 = { v27, v28 };
            fun.drawBLine(dxf, Line20, 0.2, contour);
            Vector2[] Line21 = { v23, v28 };
            fun.drawBLine(dxf, Line21, 0.2, contour);
            //标注线
            Vector2[] Line22 = { v29, v1 };
            fun.drawBLine(dxf, Line22, 0, skviewdimensioning);
            Vector2[] Line23 = { v2, v31 };
            fun.drawBLine(dxf, Line23, 0, skviewdimensioning);
            Vector2[] Line24 = { v7, v30 };
            fun.drawPlinetype(dxf, Line24, 0.15, skviewdimensioning, Linetype.Dashed);
            Vector2[] Line25 = { v32, v30 };
            fun.drawPlinetype(dxf, Line25, 0.15, skviewdimensioning, Linetype.Dashed);
            Vector2[] Line26 = { v23, v33 };
            fun.drawBLine(dxf, Line26, 0, skviewdimensioning);
            Vector2[] Line27 = { v23, v34 };
            fun.drawBLine(dxf, Line27, 0, skviewdimensioning);
            Vector2[] Line28 = { v23, v35 };
            fun.drawBLine(dxf, Line28, 0, skviewdimensioning);
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 3;
            //图一上图尺寸
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 180, dimensionStyle);
            dim1.UserText = "CF ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v30, v2), offset + 3, 180, dimensionStyle);
            dim2.UserText = "PDX ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v1, v8), offset + 0.45, 90, dimensionStyle);
            dim3.UserText = "CDX ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v1, v30), offset, 90, dimensionStyle);
            dim4.UserText = "PDY ";
            dxf.AddEntity(dim4);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v8, v16), new Line(v2, v3), offset + 10, dimensionStyle);
            angdim1.UserText = "PNA  ";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v8, v16), new Line(v1, v29), offset + 5, dimensionStyle);
            angdim2.UserText = "PAL ";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v2, v31), new Line(v2, v3), offset + 5, dimensionStyle);
            angdim3.UserText = "PAR ";
            dxf.AddEntity(angdim3);
            //右图标注
            LinearDimension dim5 = new LinearDimension(new Line(v23, v25), offset, 270, dimensionStyle);
            dim5.UserText = "LBB ";
            dxf.AddEntity(dim5);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v23, v33), new Line(v23, v34), offset + 3, dimensionStyle);
            angdim4.UserText = "GAN ";
            dxf.AddEntity(angdim4);
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v23, v28), new Line(v23, v35), offset + 5, dimensionStyle);
            angdim5.UserText = "AN ";
            dxf.AddEntity(angdim5);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);


        }
        public static void FigureF7(Dictionary<string, Object> data)//ISO 29014-2图片F.7
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层                                                                                      
            //作图                                                             
            //参数
            double pi = Math.PI;
            double pdx = 5.87;
            double cf = 2;
            double cdx = 5.2;
            double pdy = 8;
            double par = 30 * pi / 180;
            double pal = 30 * pi / 180;
            double pna = 60 * pi / 180;
            double anl = 30 * pi / 180;
            double anr = 30 * pi / 180;
            double gan = 15 * pi / 180;
            double lbb = 8;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + cf, v1.Y);
            Vector2 v3 = new Vector2(v2.X + 6 * Math.Cos(pi / 2 - par), v2.Y + 6 * Math.Sin(pi / 2 - par));
            Vector2 v4 = new Vector2(v3.X + 3 * Math.Cos(30 * pi / 180), v3.Y + 3 * Math.Sin(30 * pi / 180));
            Vector2 v5 = new Vector2(v4.X - 2.8774, v4.Y + 1);
            Vector2 v6 = new Vector2(v2.X - pdx, v1.Y + 7.7);
            Vector2 v7 = new Vector2(v6.X, v6.Y - 2);
            Vector2 v8 = new Vector2(v1.X - 6 * Math.Cos(pi / 2 - pal), v1.Y + cdx);
            //内部虚线
            Vector2 v9 = new Vector2(v7.X, v7.Y + 0.5);
            Vector2 v10 = new Vector2(v8.X + 0.5 * Math.Cos(30 * pi / 180), v8.Y + 0.5 * Math.Sin(30 * pi / 180));
            Vector2 v11 = new Vector2(v1.X + 0.5 * Math.Cos(30 * pi / 180), v1.Y + 0.5 * Math.Sin(30 * pi / 180));
            Vector2 v12 = new Vector2(v11.X + 1.134, v11.Y);
            Vector2 v13 = new Vector2(v10.X + 7.05, v10.Y);
            Vector2 v14 = new Vector2(v13.X + 2.7232, v13.Y + 1.5722);
            //上图
            Vector2 v15 = new Vector2(v3.X + 12 * Math.Cos(60 * pi / 180), v3.Y + 12 * Math.Sin(60 * pi / 180));
            Vector2 v16 = new Vector2(v15.X - 19, v15.Y);
            Vector2 v17 = new Vector2(v15.X - 4 * Math.Cos(anr), v15.Y - 4 * Math.Sin(anr));
            Vector2 v18 = new Vector2(v17.X - 12.07, v17.Y);
            Vector2 v19 = new Vector2(v17.X - 0.2009, v17.Y + 2.4865);
            Vector2 v20 = new Vector2(v19.X - 11.67, v19.Y);
            Vector2 v21 = new Vector2(v17.X, v17.Y + 4);
            Vector2 v22 = new Vector2(v18.X, v18.Y + 4);
            //右图
            Vector2 v23 = new Vector2(v2.X + 15, v2.Y);
            Vector2 v24 = new Vector2(v23.X - 6 * Math.Sin(gan), v23.Y + 6 * Math.Cos(gan));
            Vector2 v25 = new Vector2(v23.X, v23.Y + lbb);
            Vector2 v26 = new Vector2(v25.X, v25.Y + 1);
            Vector2 v27 = new Vector2(v26.X - 3.9742, v26.Y + 0.4538);
            Vector2 v28 = new Vector2(v27.X - 1.4747, v27.Y - 1.9538);
            Vector2 v29 = new Vector2(v23.X - 6.4618, v23.Y + 2.5353);
            Vector2 v30 = new Vector2(v23.X - 3.8637, v23.Y + 1.0353);
            //标注点
            Vector2 v31 = new Vector2(v1.X, v1.Y + 10);
            Vector2 v32 = new Vector2(v7.X, v1.Y - pdy);
            Vector2 v33 = new Vector2(v2.X, v2.Y + 10);
            Vector2 v34 = new Vector2(v1.X + 7.12, v1.Y);
            Vector2 v35 = new Vector2(v23.X, v23.Y - 3);
            Vector2 v36 = new Vector2(v23.X + 3 * Math.Tan(gan), v35.Y);
            Vector2 v37 = new Vector2(v24.X, v23.Y);
            //作图
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v1));
            Arc11.Vertexes.Add(new LwPolylineVertex(v2));
            Arc11.Vertexes[0].Bulge = 0.1;
            fun.PolyFill(dxf, Arc11, 0.2, contour);
            Vector2[] Line2 = { v2, v3 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            Vector2[] Line3 = { v4, v3 };
            fun.drawBLine(dxf, Line3, 0.2, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes[0].Bulge = 0.3949;
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v6));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = 0.21;
            fun.PolyFill(dxf, Arc2, 0.2, contour);
            Vector2[] Line4 = { v6, v7 };
            fun.drawBLine(dxf, Line4, 0.2, contour);
            Vector2[] Line5 = { v8, v7 };
            fun.drawBLine(dxf, Line5, 0.2, contour);
            Vector2[] Line6 = { v8, v1 };
            fun.drawBLine(dxf, Line6, 0.2, contour);
            //内部虚线
            Vector2[] Line7 = { v9, v10 };
            fun.drawPlinetype(dxf, Line7, 0.15, refin, Linetype.Dashed);
            Vector2[] Line8 = { v11, v10 };
            fun.drawPlinetype(dxf, Line8, 0.15, refin, Linetype.Dashed);
            Vector2[] Line9 = { v11, v12 };
            fun.drawPlinetype(dxf, Line9, 0.15, refin, Linetype.Dashed);
            Vector2[] Line10 = { v13, v12 };
            fun.drawPlinetype(dxf, Line10, 0.15, refin, Linetype.Dashed);
            Vector2[] Line11 = { v13, v14 };
            fun.drawPlinetype(dxf, Line11, 0.15, refin, Linetype.Dashed);
            //上图
            Vector2[] Line12 = { v15, v3 };
            fun.drawBLine(dxf, Line12, 0, skviewdimensioning);
            Vector2[] Line13 = { v16, v8 };
            fun.drawBLine(dxf, Line13, 0, skviewdimensioning);
            Vector2[] Line14 = { v15, v17 };
            fun.drawBLine(dxf, Line14, 0.2, contour);
            Vector2[] Line15 = { v16, v18 };
            fun.drawBLine(dxf, Line15, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v17));
            Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            Arc3.Vertexes[0].Bulge = 0.2189;
            fun.PolyFill(dxf, Arc3, 0.1, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v18));
            Arc4.Vertexes.Add(new LwPolylineVertex(v20));
            Arc4.Vertexes[0].Bulge = -0.2189;
            fun.PolyFill(dxf, Arc4, 0.1, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v19));
            Arc5.Vertexes.Add(new LwPolylineVertex(v21));
            Arc5.Vertexes[0].Bulge = -0.33;
            fun.PolyFill(dxf, Arc5, 0.1, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v20));
            Arc6.Vertexes.Add(new LwPolylineVertex(v22));
            Arc6.Vertexes[0].Bulge = 0.33;
            fun.PolyFill(dxf, Arc6, 0.1, contour);
            Vector2[] Line16 = { v15, v21 };
            fun.drawBLine(dxf, Line16, 0.2, contour);
            Vector2[] Line17 = { v16, v22 };
            fun.drawBLine(dxf, Line17, 0.2, contour);
            //右图
            Vector2[] Line18 = { v23, v24 };
            fun.drawBLine(dxf, Line18, 0.2, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v24));
            Arc7.Vertexes.Add(new LwPolylineVertex(v25));
            Arc7.Vertexes[0].Bulge = -0.2858;
            fun.PolyFill(dxf, Arc7, 0.2, contour);
            Vector2[] Line19 = { v25, v26 };
            fun.drawBLine(dxf, Line19, 0.2, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v27));
            Arc8.Vertexes.Add(new LwPolylineVertex(v26));
            Arc8.Vertexes[0].Bulge = -0.1;
            fun.PolyFill(dxf, Arc8, 0.2, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v27));
            Arc9.Vertexes.Add(new LwPolylineVertex(v28));
            Arc9.Vertexes[0].Bulge = 0.4247;
            fun.PolyFill(dxf, Arc9, 0.2, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v28));
            Arc10.Vertexes.Add(new LwPolylineVertex(v29));
            Arc10.Vertexes[0].Bulge = -0.1739;
            fun.PolyFill(dxf, Arc10, 0.2, contour);
            Vector2[] Line21 = { v29, v30 };
            fun.drawBLine(dxf, Line21, 0.2, contour);
            Vector2[] Line22 = { v23, v30 };
            fun.drawBLine(dxf, Line22, 0.2, contour);
            //标注线
            Vector2[] Line23 = { v31, v1 };
            fun.drawBLine(dxf, Line23, 0, skviewdimensioning);
            Vector2[] Line24 = { v2, v33 };
            fun.drawBLine(dxf, Line24, 0, skviewdimensioning);
            Vector2[] Line25 = { v7, v32 };
            fun.drawPlinetype(dxf, Line25, 0.15, skviewdimensioning, Linetype.Dashed);
            Vector2[] Line26 = { v34, v32 };
            fun.drawPlinetype(dxf, Line26, 0.15, skviewdimensioning, Linetype.Dashed);
            Vector2[] Line27 = { v23, v35 };
            fun.drawBLine(dxf, Line27, 0, skviewdimensioning);
            Vector2[] Line28 = { v23, v36 };
            fun.drawBLine(dxf, Line28, 0, skviewdimensioning);
            Vector2[] Line29 = { v23, v37 };
            fun.drawBLine(dxf, Line29, 0, skviewdimensioning);
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 3;
            //图一上图尺寸
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 180, dimensionStyle);
            dim1.UserText = "CF ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v32, v2), offset + 3, 180, dimensionStyle);
            dim2.UserText = "PDX ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v1, v8), offset + 0.45, 90, dimensionStyle);
            dim3.UserText = "CDX ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v1, v32), offset, 90, dimensionStyle);
            dim4.UserText = "PDY ";
            dxf.AddEntity(dim4);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v8, v16), new Line(v2, v3), offset + 10, dimensionStyle);
            angdim1.UserText = "PNA  ";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v8, v16), new Line(v1, v31), offset + 5, dimensionStyle);
            angdim2.UserText = "PAL ";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v2, v33), new Line(v2, v3), offset + 5, dimensionStyle);
            angdim3.UserText = "PAR ";
            dxf.AddEntity(angdim3);
            //右图标注
            LinearDimension dim5 = new LinearDimension(new Line(v23, v25), offset, 270, dimensionStyle);
            dim5.UserText = "LBB ";
            dxf.AddEntity(dim5);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v23, v35), new Line(v23, v36), offset + 3, dimensionStyle);
            angdim4.UserText = "GAN ";
            dxf.AddEntity(angdim4);
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v23, v30), new Line(v23, v37), offset + 5, dimensionStyle);
            angdim5.UserText = "AN ";
            dxf.AddEntity(angdim5);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF8(Dictionary<string, Object> data)//ISO 29014-2图片F.8
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层                                                                                      
            //作图                                                             
            //参数
            double pi = Math.PI;
            double pdx = 5.87;
            double cdx = 5.2;
            double pdy = 8;
            double par = 30 * pi / 180;
            double pal = 30 * pi / 180;
            double pna = 60 * pi / 180;
            double anl = 30 * pi / 180;
            double anr = 30 * pi / 180;
            double gan = 15 * pi / 180;
            double lbb = 8;
            double re = 0.5;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + re, v1.Y);
            Vector2 v3 = new Vector2(v2.X + 6 * Math.Cos(pi / 2 - par), v2.Y + 6 * Math.Sin(pi / 2 - par));
            Vector2 v4 = new Vector2(v3.X + 3 * Math.Cos(30 * pi / 180), v3.Y + 3 * Math.Sin(30 * pi / 180));
            Vector2 v5 = new Vector2(v4.X - 2.8774, v4.Y + 1);
            Vector2 v6 = new Vector2(v2.X - pdx, v1.Y + 7.7);
            Vector2 v7 = new Vector2(v6.X, v6.Y - 2);
            Vector2 v8 = new Vector2(v1.X - 6 * Math.Cos(pi / 2 - pal), v1.Y + cdx);
            //内部虚线
            Vector2 v9 = new Vector2(v7.X, v7.Y + 0.5);
            Vector2 v10 = new Vector2(v8.X + 0.5 * Math.Cos(30 * pi / 180), v8.Y + 0.5 * Math.Sin(30 * pi / 180));
            Vector2 v11 = new Vector2(v1.X + re / 4, v1.Y + 0.5);
            Vector2 v12 = new Vector2(v11.X + re / 2, v11.Y);
            Vector2 v13 = new Vector2(v10.X + 5.7, v10.Y);
            Vector2 v14 = new Vector2(v13.X + 2.7232, v13.Y + 1.5722);
            //上图
            Vector2 v15 = new Vector2(v3.X + 12 * Math.Cos(60 * pi / 180), v3.Y + 12 * Math.Sin(60 * pi / 180));
            Vector2 v16 = new Vector2(v15.X - 19, v15.Y);
            Vector2 v17 = new Vector2(v15.X - 4 * Math.Cos(anr), v15.Y - 4 * Math.Sin(anr));
            Vector2 v18 = new Vector2(v17.X - 12.07, v17.Y);
            Vector2 v19 = new Vector2(v17.X - 0.2009, v17.Y + 2.4865);
            Vector2 v20 = new Vector2(v19.X - 11.67, v19.Y);
            Vector2 v21 = new Vector2(v17.X, v17.Y + 4);
            Vector2 v22 = new Vector2(v18.X, v18.Y + 4);
            //右图
            Vector2 v23 = new Vector2(v2.X + 15, v2.Y);
            Vector2 v24 = new Vector2(v23.X - 6 * Math.Sin(gan), v23.Y + 6 * Math.Cos(gan));
            Vector2 v25 = new Vector2(v23.X, v23.Y + lbb);
            Vector2 v26 = new Vector2(v25.X, v25.Y + 1);
            Vector2 v27 = new Vector2(v26.X - 2.9742, v26.Y + 0.4538);
            Vector2 v28 = new Vector2(v27.X - 2.4747, v27.Y - 2.1);
            Vector2 v29 = new Vector2(v23.X - 6.4618, v23.Y + 2.5353);
            Vector2 v30 = new Vector2(v23.X - 3.8637, v23.Y + 1.0353);
            //标注点
            Vector2 v31 = new Vector2(v1.X, v1.Y + 10);
            Vector2 v32 = new Vector2(v7.X, v1.Y - pdy);
            Vector2 v33 = new Vector2(v2.X, v2.Y + 10);
            Vector2 v34 = new Vector2(v1.X + 7.12, v1.Y);
            Vector2 v35 = new Vector2(v23.X, v23.Y - 3);
            Vector2 v36 = new Vector2(v23.X + 3 * Math.Tan(gan), v35.Y);
            Vector2 v37 = new Vector2(v24.X, v23.Y);
            Vector2 v38 = new Vector2(v1.X + re / 2, v1.Y);
            Vector2 v39 = new Vector2(v38.X, v38.Y + 10);
            //作图
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v1));
            Arc11.Vertexes.Add(new LwPolylineVertex(v2));
            Arc11.Vertexes[0].Bulge = 0.1;
            fun.PolyFill(dxf, Arc11, 0.2, contour);
            Vector2[] Line2 = { v2, v3 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            Vector2[] Line3 = { v4, v3 };
            fun.drawBLine(dxf, Line3, 0.2, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes[0].Bulge = 0.3949;
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v6));
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes[0].Bulge = 0.21;
            fun.PolyFill(dxf, Arc2, 0.2, contour);
            Vector2[] Line4 = { v6, v7 };
            fun.drawBLine(dxf, Line4, 0.2, contour);
            Vector2[] Line5 = { v8, v7 };
            fun.drawBLine(dxf, Line5, 0.2, contour);
            Vector2[] Line6 = { v8, v1 };
            fun.drawBLine(dxf, Line6, 0.2, contour);
            //内部虚线
            Vector2[] Line7 = { v9, v10 };
            fun.drawPlinetype(dxf, Line7, 0.15, refin, Linetype.Dashed);
            Vector2[] Line8 = { v11, v10 };
            fun.drawPlinetype(dxf, Line8, 0.15, refin, Linetype.Dashed);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v11));
            Arc12.Vertexes.Add(new LwPolylineVertex(v12));
            Arc12.Vertexes[0].Bulge = 0.1;
            Arc12.Layer = refin;
            Arc12.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc12);
            Vector2[] Line10 = { v13, v12 };
            fun.drawPlinetype(dxf, Line10, 0.15, refin, Linetype.Dashed);
            Vector2[] Line11 = { v13, v14 };
            fun.drawPlinetype(dxf, Line11, 0.15, refin, Linetype.Dashed);
            //上图
            Vector2[] Line12 = { v15, v3 };
            fun.drawBLine(dxf, Line12, 0, skviewdimensioning);
            Vector2[] Line13 = { v16, v8 };
            fun.drawBLine(dxf, Line13, 0, skviewdimensioning);
            Vector2[] Line14 = { v15, v17 };
            fun.drawBLine(dxf, Line14, 0.2, contour);
            Vector2[] Line15 = { v16, v18 };
            fun.drawBLine(dxf, Line15, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v17));
            Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            Arc3.Vertexes[0].Bulge = 0.2189;
            fun.PolyFill(dxf, Arc3, 0.1, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v18));
            Arc4.Vertexes.Add(new LwPolylineVertex(v20));
            Arc4.Vertexes[0].Bulge = -0.2189;
            fun.PolyFill(dxf, Arc4, 0.1, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v19));
            Arc5.Vertexes.Add(new LwPolylineVertex(v21));
            Arc5.Vertexes[0].Bulge = -0.33;
            fun.PolyFill(dxf, Arc5, 0.1, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v20));
            Arc6.Vertexes.Add(new LwPolylineVertex(v22));
            Arc6.Vertexes[0].Bulge = 0.33;
            fun.PolyFill(dxf, Arc6, 0.1, contour);
            Vector2[] Line16 = { v15, v21 };
            fun.drawBLine(dxf, Line16, 0.2, contour);
            Vector2[] Line17 = { v16, v22 };
            fun.drawBLine(dxf, Line17, 0.2, contour);
            //右图
            Vector2[] Line18 = { v23, v24 };
            fun.drawBLine(dxf, Line18, 0.2, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v24));
            Arc7.Vertexes.Add(new LwPolylineVertex(v25));
            Arc7.Vertexes[0].Bulge = -0.2858;
            fun.PolyFill(dxf, Arc7, 0.2, contour);
            Vector2[] Line19 = { v25, v26 };
            fun.drawBLine(dxf, Line19, 0.2, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v27));
            Arc8.Vertexes.Add(new LwPolylineVertex(v26));
            Arc8.Vertexes[0].Bulge = 0.2;
            fun.PolyFill(dxf, Arc8, 0.2, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v27));
            Arc9.Vertexes.Add(new LwPolylineVertex(v28));
            Arc9.Vertexes[0].Bulge = 0.718;
            fun.PolyFill(dxf, Arc9, 0.2, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v28));
            Arc10.Vertexes.Add(new LwPolylineVertex(v29));
            Arc10.Vertexes[0].Bulge = -0.3;
            fun.PolyFill(dxf, Arc10, 0.2, contour);
            Vector2[] Line21 = { v29, v30 };
            fun.drawBLine(dxf, Line21, 0.2, contour);
            Vector2[] Line22 = { v23, v30 };
            fun.drawBLine(dxf, Line22, 0.2, contour);
            //标注线
            Vector2[] Line23 = { v31, v1 };
            fun.drawBLine(dxf, Line23, 0, skviewdimensioning);
            Vector2[] Line24 = { v2, v33 };
            fun.drawBLine(dxf, Line24, 0, skviewdimensioning);
            Vector2[] Line25 = { v7, v32 };
            fun.drawPlinetype(dxf, Line25, 0.15, skviewdimensioning, Linetype.Dashed);
            Vector2[] Line26 = { v34, v32 };
            fun.drawPlinetype(dxf, Line26, 0.15, skviewdimensioning, Linetype.Dashed);
            Vector2[] Line27 = { v23, v35 };
            fun.drawBLine(dxf, Line27, 0, skviewdimensioning);
            Vector2[] Line28 = { v23, v36 };
            fun.drawBLine(dxf, Line28, 0, skviewdimensioning);
            Vector2[] Line29 = { v23, v37 };
            fun.drawBLine(dxf, Line29, 0, skviewdimensioning);
            Vector2[] Line30 = { v38, v39 };
            fun.drawPlinetype(dxf, Line30, 0.15, centre, Linetype.Dashed);
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            ds.TextHeight = 3;
            //图一上图尺寸
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 180, dimensionStyle);
            dim1.UserText = "CF ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v32, v38), offset + 3, 180, dimensionStyle);
            dim2.UserText = "PDX ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v1, v8), offset + 0.45, 90, dimensionStyle);
            dim3.UserText = "CDX ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v1, v32), offset, 90, dimensionStyle);
            dim4.UserText = "PDY ";
            dxf.AddEntity(dim4);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v8, v16), new Line(v2, v3), offset + 10, dimensionStyle);
            angdim1.UserText = "PNA  ";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v8, v16), new Line(v1, v31), offset + 5, dimensionStyle);
            angdim2.UserText = "PAL ";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v2, v33), new Line(v2, v3), offset + 5, dimensionStyle);
            angdim3.UserText = "PAR ";
            dxf.AddEntity(angdim3);
            //右图标注
            LinearDimension dim5 = new LinearDimension(new Line(v23, v25), offset, 270, dimensionStyle);
            dim5.UserText = "LBB ";
            dxf.AddEntity(dim5);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v23, v35), new Line(v23, v36), offset + 3, dimensionStyle);
            angdim4.UserText = "GAN ";
            dxf.AddEntity(angdim4);
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v23, v30), new Line(v23, v37), offset + 5, dimensionStyle);
            angdim5.UserText = "AN ";
            dxf.AddEntity(angdim5);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);

        }
        public static void FigureF9(Dictionary<string, Object> data)//ISO 29014-2图片F.9
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层                                                                                      
            //作图                                                             
            //参数
            double pi = Math.PI;
            double pna = 39 * pi / 180;
            double pdx = 9.53;
            double pdy = 18;
            double retr = 6;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + 4.717, v1.Y + 3.3418);
            Vector2 v3 = new Vector2(-v2.X, v2.Y);
            Vector2 v4 = new Vector2(v1.X, v1.Y - 2);
            Vector2 v5 = new Vector2(v1.X, v1.Y + 14);
            Vector2 v6 = new Vector2(v2.X + retr - 2.0561, v2.Y + 3.9439);
            Vector2 v7 = new Vector2(-v6.X, v6.Y);
            Vector2 v8 = new Vector2(v6.X + 0.8667, v6.Y + 0.4988);
            Vector2 v9 = new Vector2(-v8.X, v8.Y);
            Vector2 v10 = new Vector2(v8.X, v8.Y + 2.82);
            Vector2 v11 = new Vector2(v10.X + 0.6404, v10.Y + 1.0322);
            Vector2 v12 = new Vector2(v11.X - 0.6392, v11.Y + 1.143);
            Vector2 v13 = new Vector2(v1.X, v1.Y + 11.63);
            Vector2 v14 = new Vector2(v13.X - 9.53, v12.Y);
            //标注点
            Vector2 v15 = new Vector2(v1.X - pdx, v1.Y - pdy);
            Vector2 v16 = new Vector2(v1.X - pdx, v1.Y);
            Vector2 v17 = new Vector2(v15.X + 28 * Math.Cos(30 * pi / 180), v15.Y + 14);
            Vector2 v18 = new Vector2(v2.X + 4.4615, v2.Y + 14.3211);
            Vector2 v19 = new Vector2(-v18.X, v18.Y);
            Vector2 v20 = new Vector2(v2.X + 5.723, v2.Y - 1.8021);
            Vector2 v21 = new Vector2(v4.X + 1, v4.Y);
            Vector2 v22 = new Vector2(-v20.X, v20.Y);
            //中心线
            Vector2[] Line1 = { v5, v4 };
            fun.drawPlinetype(dxf, Line1, 0.15, centre, Linetype.Dashed);
            //作图
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v1));
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes[0].Bulge = 0.33;
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v1));
            Arc2.Vertexes.Add(new LwPolylineVertex(v3));
            Arc2.Vertexes[0].Bulge = -0.33;
            fun.PolyFill(dxf, Arc2, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v2));
            Arc3.Vertexes.Add(new LwPolylineVertex(v6));
            Arc3.Vertexes[0].Bulge = -0.24;
            fun.PolyFill(dxf, Arc3, 0.2, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v3));
            Arc4.Vertexes.Add(new LwPolylineVertex(v7));
            Arc4.Vertexes[0].Bulge = 0.24;
            fun.PolyFill(dxf, Arc4, 0.2, contour);
            Vector2[] Line2 = { v6, v8 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            Vector2[] Line3 = { v7, v9 };
            fun.drawBLine(dxf, Line3, 0.2, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v8));
            Arc5.Vertexes.Add(new LwPolylineVertex(v10));
            Arc5.Vertexes[0].Bulge = -0.3911;
            fun.PolyFill(dxf, Arc5, 0.2, contour);
            Vector2[] Line4 = { v10, v11 };
            fun.drawBLine(dxf, Line4, 0.2, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v11));
            Arc6.Vertexes.Add(new LwPolylineVertex(v12));
            Arc6.Vertexes[0].Bulge = 0.4152;
            fun.PolyFill(dxf, Arc6, 0.2, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v13));
            Arc7.Vertexes.Add(new LwPolylineVertex(v12));
            Arc7.Vertexes[0].Bulge = -0.0544;
            fun.PolyFill(dxf, Arc7, 0.2, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v13));
            Arc8.Vertexes.Add(new LwPolylineVertex(v14));
            Arc8.Vertexes[0].Bulge = -0.1643;
            fun.PolyFill(dxf, Arc8, 0.2, contour);
            Vector2[] Line5 = { v14, v9 };
            fun.drawBLine(dxf, Line5, 0.2, contour);
            Arc arc1 = fun.DrawArc(v2, new Vector2(v20.X, v20.Y), v4);
            Arc arc2 = fun.DrawArc(v1, new Vector2(v21.X, v21.Y), v2);
            Arc arc3 = fun.DrawArc(v3, new Vector2(v22.X, v22.Y), v5);
            //标注线
            Vector2[] Line6 = { v15, v9 };
            fun.drawPlinetype(dxf, Line6, 0.15, skviewdimensioning, Linetype.Dashed);
            Vector2[] Line7 = { v15, v17 };
            fun.drawPlinetype(dxf, Line7, 0.15, skviewdimensioning, Linetype.Dashed);
            Vector2[] Line8 = { v18, v2 };
            fun.drawBLine(dxf, Line8, 0.07, skviewdimensioning);
            Vector2[] Line9 = { v19, v3 };
            fun.drawBLine(dxf, Line9, 0.07, skviewdimensioning);
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1.6;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            LinearDimension dim1 = new LinearDimension(new Line(v15, v1), offset, 180, dimensionStyle);
            dim1.UserText = "PDX ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v15, v16), offset, 90, dimensionStyle);
            dim2.UserText = "PDY";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v9, v16), offset, 90, dimensionStyle);
            dim3.UserText = "CDX";
            dxf.AddEntity(dim3);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v2, v18), new Line(v3, v19), offset + 25, dimensionStyle);
            angdim1.UserText = "PNA  ";
            dxf.AddEntity(angdim1);
            RadialDimension dimrad1 = new RadialDimension(arc1, 135, -0.1, dimensionStyle);
            dimrad1.UserText = "RETR ";
            dxf.AddEntity(dimrad1);
            RadialDimension dimrad2 = new RadialDimension(arc2, 100, -3, dimensionStyle);
            dimrad2.UserText = "RE ";
            dxf.AddEntity(dimrad2);
            RadialDimension dimrad3 = new RadialDimension(arc3, 45, -0.1, dimensionStyle);
            dimrad3.UserText = "RETL ";
            dxf.AddEntity(dimrad3);

            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF10(Dictionary<string, Object> data)//ISO 29014-2图片F.10
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层                                                                                      
            //作图                                                             
            //参数
            double pi = Math.PI;
            double cw = 9.9;
            double cdx = 25.5;
            double ral = 5 * pi / 180;
            double rar = 5 * pi / 180;
            double bw = 14.45;
            double anr = 30 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //坐标
            //下图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + cw / 2, v1.Y + 5.2);
            Vector2 v3 = new Vector2(-v2.X, v2.Y);
            Vector2 v4 = new Vector2(v2.X - 2, v2.Y + 24.91);
            Vector2 v5 = new Vector2(-v4.X, v4.Y);
            Vector2 v6 = new Vector2(v4.X + 4.2286, v4.Y + 1.5391);
            Vector2 v7 = new Vector2(v6.X - bw, v6.Y);
            Vector2 v8 = new Vector2(v6.X, v6.Y + 6);
            Vector2 v9 = new Vector2(-v8.X, v8.Y);
            Vector2 v10 = new Vector2(v8.X - 4.803, v8.Y - 0.38);
            //内部虚线
            Vector2 v11 = new Vector2(v7.X, v7.Y + 1);
            Vector2 v12 = new Vector2(v11.X + 5.2542, v11.Y - 1.9124);
            Vector2 v13 = new Vector2(v3.X + 0.76, v3.Y);
            Vector2 v14 = new Vector2(v1.X, v1.Y + 1);
            Vector2 v15 = new Vector2(-v13.X, v13.Y);
            Vector2 v16 = new Vector2(-v12.X, v12.Y);
            Vector2 v17 = new Vector2(-v11.X, v11.Y);
            //上图
            Vector2 v18 = new Vector2(v4.X - 3.9647, v4.Y + 49.4173);
            Vector2 v19 = new Vector2(-v18.X, v18.Y);
            Vector2 v20 = new Vector2(v18.X - 2.9583, v18.Y - 6.34);
            Vector2 v21 = new Vector2(-v20.X, v20.Y);
            Vector2 v22 = new Vector2(v18.X - 6.9734, v18.Y - 0.61);
            Vector2 v23 = new Vector2(-v22.X, v22.Y);
            Vector2 v24 = new Vector2(v22.X + 0.9355, v22.Y - 2.6077);
            Vector2 v25 = new Vector2(-v24.X, v24.Y);
            //标注点
            Vector2 v26 = new Vector2(v3.X, v3.Y + cdx);
            Vector2 v27 = new Vector2(-v26.X, v26.Y);
            Vector2 v28 = new Vector2(v1.X + 5, v1.Y);
            //作图
            //下图
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v1));
            Arc1.Vertexes.Add(new LwPolylineVertex(v2));
            Arc1.Vertexes[0].Bulge = 0.43;
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v1));
            Arc2.Vertexes.Add(new LwPolylineVertex(v3));
            Arc2.Vertexes[0].Bulge = -0.43;
            fun.PolyFill(dxf, Arc2, 0.2, contour);
            Vector2[] Line1 = { v2, v4 };
            fun.drawBLine(dxf, Line1, 0.2, contour);
            Vector2[] Line2 = { v3, v5 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            Vector2[] Line3 = { v4, v6 };
            fun.drawBLine(dxf, Line3, 0.2, contour);
            Vector2[] Line4 = { v5, v7 };
            fun.drawBLine(dxf, Line4, 0.2, contour);
            Vector2[] Line5 = { v6, v8 };
            fun.drawBLine(dxf, Line5, 0.2, contour);
            Vector2[] Line6 = { v9, v7 };
            fun.drawBLine(dxf, Line6, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v8));
            Arc3.Vertexes.Add(new LwPolylineVertex(v10));
            Arc3.Vertexes[0].Bulge = 0.2327;
            fun.PolyFill(dxf, Arc3, 0.2, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v9));
            Arc4.Vertexes.Add(new LwPolylineVertex(v10));
            Arc4.Vertexes[0].Bulge = 0.3;
            fun.PolyFill(dxf, Arc4, 0.2, contour);
            //内部虚线
            Vector2[] Line7 = { v11, v12 };
            fun.drawPlinetype(dxf, Line7, 0.15, refin, Linetype.Dashed);
            Vector2[] Line8 = { v13, v12 };
            fun.drawPlinetype(dxf, Line8, 0.15, refin, Linetype.Dashed);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v13));
            Arc5.Vertexes.Add(new LwPolylineVertex(v14));
            Arc5.Vertexes[0].Bulge = 0.43;
            Arc5.Layer = refin;
            Arc5.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc5);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v15));
            Arc6.Vertexes.Add(new LwPolylineVertex(v14));
            Arc6.Vertexes[0].Bulge = -0.43;
            Arc6.Layer = refin;
            Arc6.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc6);
            Vector2[] Line9 = { v15, v16 };
            fun.drawPlinetype(dxf, Line9, 0.15, refin, Linetype.Dashed);
            Vector2[] Line10 = { v17, v16 };
            fun.drawPlinetype(dxf, Line10, 0.15, refin, Linetype.Dashed);
            //上图
            Vector2[] Line11 = { v18, v20 };
            fun.drawBLine(dxf, Line11, 0.2, contour);
            Vector2[] Line12 = { v19, v21 };
            fun.drawBLine(dxf, Line12, 0.2, contour);
            Vector2[] Line13 = { v18, v22 };
            fun.drawBLine(dxf, Line13, 0.2, contour);
            Vector2[] Line14 = { v19, v23 };
            fun.drawBLine(dxf, Line14, 0.2, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v22));
            Arc7.Vertexes.Add(new LwPolylineVertex(v24));
            Arc7.Vertexes[0].Bulge = 0.62;
            fun.PolyFill(dxf, Arc7, 0.1, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v23));
            Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            Arc8.Vertexes[0].Bulge = -0.62;
            fun.PolyFill(dxf, Arc8, 0.1, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v24));
            Arc9.Vertexes.Add(new LwPolylineVertex(v20));
            Arc9.Vertexes[0].Bulge = -0.35;
            fun.PolyFill(dxf, Arc9, 0.1, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v25));
            Arc10.Vertexes.Add(new LwPolylineVertex(v21));
            Arc10.Vertexes[0].Bulge = 0.35;
            fun.PolyFill(dxf, Arc10, 0.1, contour);
            //标注线
            Vector2[] Line15 = { v18, v4 };
            fun.drawBLine(dxf, Line15, 0.07, skviewdimensioning);
            Vector2[] Line16 = { v19, v5 };
            fun.drawBLine(dxf, Line16, 0.07, skviewdimensioning);
            Vector2[] Line17 = { v3, v26 };
            fun.drawBLine(dxf, Line17, 0.07, skviewdimensioning);
            Arc arc1 = fun.DrawArc(v2, new Vector2(v2.X, v2.Y - 10), v1);
            //标注样式
            //箭头样式
            double offset = 10;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.5;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 2;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 0.8;
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v18, v20), new Line(v18, v4), offset, dimensionStyle);
            angdim1.UserText = "ANR  ";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v19, v21), new Line(v19, v5), offset, dimensionStyle);
            angdim2.UserText = "ANR  ";
            dxf.AddEntity(angdim2);
            LinearDimension dim1 = new LinearDimension(new Line(v2, v3), offset + 2, 180, dimensionStyle);
            dim1.UserText = "CW ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v2, v7), offset + 20, 180, dimensionStyle);
            dim2.UserText = "PDX ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v3, v26), offset, 90, dimensionStyle);
            dim3.UserText = "CDX ";
            dxf.AddEntity(dim3);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v3, v5), new Line(v3, v26), offset + 30, dimensionStyle);
            angdim3.UserText = "RAL  ";
            dxf.AddEntity(angdim3);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v2, v4), new Line(v2, v27), offset + 40, dimensionStyle);
            angdim4.UserText = "RAR  ";
            dxf.AddEntity(angdim4);
            LinearDimension dim4 = new LinearDimension(new Line(v8, v9), offset + 10, 0, dimensionStyle);
            dim4.UserText = "BW";
            dxf.AddEntity(dim4);
            RadialDimension dimrad1 = new RadialDimension(arc1, 144, -1, dimensionStyle);
            dimrad1.UserText = "RE";
            dxf.AddEntity(dimrad1);

            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF11(Dictionary<string, Object> data)//ISO 29014-2图片F.11
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层                                                                                      
            //作图                                                             
            //参数
            //图一
            double pi = Math.PI;
            double dci = 14.31;
            string path = Convert.ToString(data["path"]);
            //图一坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + 4, v1.Y);
            Vector2 v3 = new Vector2(v2.X, v2.Y + 6);
            Vector2 v4 = new Vector2(v3.X - 1, v3.Y);
            Vector2 v5 = new Vector2(v4.X - 0.3, v4.Y + 0.3);
            Vector2 v6 = new Vector2(v5.X, v5.Y + 1.7);
            Vector2 v7 = new Vector2(v6.X + 0.3, v6.Y + 0.3);
            Vector2 v8 = new Vector2(v7.X + 1, v7.Y);
            Vector2 v9 = new Vector2(v8.X, v1.Y + dci);
            Vector2 v10 = new Vector2(v9.X - 4, v9.Y);
            Vector2 v11 = new Vector2(v10.X - 1.2064, v10.Y - 2.07);
            Vector2 v12 = new Vector2(v11.X - 0.1961, v11.Y - 0.3665);
            Vector2 v13 = new Vector2(v12.X - 0.5895, v12.Y - 1.0124);
            Vector2 v14 = new Vector2(v13.X - 0.1931, v13.Y - 0.3665);
            Vector2 v15 = new Vector2(v14.X - 0.5895, v14.Y - 1.0124);
            Vector2 v16 = new Vector2(v15.X - 0.1931, v15.Y - 0.3665);
            Vector2 v17 = new Vector2(v16.X - 1, v16.Y - 1.7205);
            Vector2 v18 = new Vector2(v17.X, v17.Y - 0.5029);
            Vector2 v19 = new Vector2(v18.X + 1.3975, v18.Y - 2.4205);
            Vector2 v20 = new Vector2(v19.X + 0.1961, v19.Y - 0.3665);
            Vector2 v21 = new Vector2(v20.X + 0.5895, v20.Y - 1.0124);
            Vector2 v22 = new Vector2(v21.X + 0.1961, v21.Y - 0.3665);
            Vector2 v23 = new Vector2(v22.X + 0.5895, v22.Y - 1.0124);
            Vector2 v24 = new Vector2(v23.X + 0.1961, v23.Y - 0.3665);
            //内部坐标
            Vector2 v25 = new Vector2(v9.X, v9.Y - 0.3);
            Vector2 v26 = new Vector2(v25.X - 4.1737, v25.Y);
            Vector2 v27 = new Vector2(v26.X + 0.42, v26.Y);
            Vector2 v28 = new Vector2(v27.X - 4.15, v27.Y - 7.2338);
            Vector2 v29 = new Vector2(v28.X + 0.71, v28.Y + 1.2027);
            Vector2 v30 = new Vector2(v1.X + 1.5, v1.Y);
            Vector2 v31 = new Vector2(v2.X - 1.6, v2.Y + 3.37);
            Vector2 v32 = new Vector2(v31.X, v31.Y + 7.31);
            //右图坐标
            Vector2 v33 = new Vector2(v2.X + 12, v2.Y);
            Vector2 v34 = new Vector2(v33.X + 1 * Math.Cos(10 * pi / 180), v33.Y + 1 * Math.Sin(10 * pi / 180));
            Vector2 v35 = new Vector2(v34.X, v34.Y + 13.6344);
            Vector2 v36 = new Vector2(v35.X - 1.6247, v35.Y + 0.2865);
            Vector2 v37 = new Vector2(v36.X - 0.1738, v36.Y + 0.2135);
            Vector2 v38 = new Vector2(v37.X - 0.7186, v37.Y - 0.3);
            Vector2 v39 = new Vector2(v38.X, v38.Y - 13.4844);
            Vector2 v40 = new Vector2(v39.X + 1.39, v39.Y - 0.26);
            Vector2 v41 = new Vector2(v35.X - 1.26, v35.Y + 0.2165);
            Vector2 v42 = new Vector2(v41.X, v41.Y - 13.732);
            Vector2 v43 = new Vector2(v34.X - 0.16, v34.Y - 0.03);
            Vector2 v44 = new Vector2(v43.X, v43.Y + 7);
            Vector2 v45 = new Vector2(v34.X, v34.Y + 7.64);
            Vector2 v46 = new Vector2(v38.X + 0.16, v38.Y + 0.03);
            Vector2 v47 = new Vector2(v46.X, v46.Y - 7);
            Vector2 v48 = new Vector2(v38.X, v38.Y - 7.64);
            Vector2 v49 = new Vector2(v44.X, v44.Y - 1);
            Vector2 v50 = new Vector2(v47.X, v47.Y + 1);
            //右图内部
            Vector2 v51 = new Vector2(v38.X, v38.Y - 1.66);
            Vector2 v52 = new Vector2(v51.X + 1.2586, v51.Y);
            Vector2 v53 = new Vector2(v52.X + 0.2121, v52.Y - 0.21);
            Vector2 v54 = new Vector2(v52.X, v52.Y - 0.42);
            Vector2 v55 = new Vector2(v54.X - 1.2586, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - 1.03);
            Vector2 v57 = new Vector2(v56.X + 1.2586, v56.Y);
            Vector2 v58 = new Vector2(v57.X + 0.2121, v57.Y - 0.21);
            Vector2 v59 = new Vector2(v57.X, v57.Y - 0.42);
            Vector2 v60 = new Vector2(v59.X - 1.2586, v59.Y);
            Vector2 v61 = new Vector2(v60.X, v60.Y - 1.03);
            Vector2 v62 = new Vector2(v61.X + 1.2586, v61.Y);
            Vector2 v63 = new Vector2(v62.X + 0.2121, v62.Y - 0.21);
            Vector2 v64 = new Vector2(v62.X, v62.Y - 0.42);
            Vector2 v65 = new Vector2(v64.X - 1.2586, v64.Y);
            Vector2 v66 = new Vector2(v34.X, v34.Y + 1.66);
            Vector2 v67 = new Vector2(v66.X - 1.2586, v66.Y);
            Vector2 v68 = new Vector2(v67.X - 0.2121, v67.Y + 0.21);
            Vector2 v69 = new Vector2(v67.X, v67.Y + 0.42);
            Vector2 v70 = new Vector2(v69.X + 1.2586, v69.Y);
            Vector2 v71 = new Vector2(v70.X, v70.Y + 1.03);
            Vector2 v72 = new Vector2(v71.X - 1.2586, v71.Y);
            Vector2 v73 = new Vector2(v72.X - 0.2121, v72.Y + 0.21);
            Vector2 v74 = new Vector2(v72.X, v72.Y + 0.42);
            Vector2 v75 = new Vector2(v74.X + 1.2586, v74.Y);
            Vector2 v76 = new Vector2(v75.X, v75.Y + 1.03);
            Vector2 v77 = new Vector2(v76.X - 1.2586, v76.Y);
            Vector2 v78 = new Vector2(v77.X - 0.2121, v77.Y + 0.21);
            Vector2 v79 = new Vector2(v77.X, v77.Y + 0.42);
            Vector2 v80 = new Vector2(v79.X + 1.2586, v79.Y);
            //右图内部虚线
            Vector2 v81 = new Vector2(v55.X + 0.63, v55.Y);
            Vector2 v82 = new Vector2(v81.X + 0.63, v81.Y - 0.24);
            Vector2 v83 = new Vector2(v82.X + 1.2568, v82.Y);
            Vector2 v84 = new Vector2(v82.X - 0.1038, v82.Y + 0.04);
            Vector2 v85 = new Vector2(v84.X, v84.Y - 2.1718);
            Vector2 v86 = new Vector2(v85.X + 1.36, v85.Y);
            Vector2 v87 = new Vector2(v80.X, v80.Y + 0.65);
            Vector2 v88 = new Vector2(v79.X, v79.Y + 0.29);
            Vector2 v89 = new Vector2(v88.X - 1.2586, v88.Y);
            Vector2 v90 = new Vector2(v77.X + 0.12, v77.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y - 0.9525);
            Vector2 v92 = new Vector2(v72.X, v72.Y - 0.11);
            Vector2 v93 = new Vector2(v92.X - 1.2586, v92.Y);
            Vector2 v94 = new Vector2(v72.X + 0.17, v72.Y);
            Vector2 v95 = new Vector2(v71.X, v71.Y - 0.19);
            //左下图
            Vector2 v96 = new Vector2(v2.X, v2.Y - 21.81);
            Vector2 v97 = new Vector2(v96.X, v96.Y + dci);
            Vector2 v98 = new Vector2(v97.X - 5, v97.Y);
            Vector2 v99 = new Vector2(v98.X - 2.8865, v98.Y - 6.1973);
            Vector2 v100 = new Vector2(v99.X, v99.Y - 1.9179);
            Vector2 v101 = new Vector2(v96.X - 5, v96.Y);
            Vector2 v102 = new Vector2(v96.X - 2.5, v96.Y);
            Vector2 v103 = new Vector2(v102.X - 2.6761, v102.Y + 0.3777);
            Vector2 v104 = new Vector2(v96.X, v96.Y + 4.12);
            Vector2 v105 = new Vector2(v104.X - 6.9316, v104.Y);
            Vector2 v106 = new Vector2(v104.X, v104.Y + 3.57);
            Vector2 v107 = new Vector2(v106.X - 7.256, v106.Y);
            Vector2 v108 = new Vector2(v107.X + 0.1443, v107.Y + 0.8994);
            Vector2 v109 = new Vector2(v108.X, v108.Y - 1.9004);
            Vector2 v110 = new Vector2(v109.X + 0.3111, v109.Y - 0.6088);
            Vector2 v111 = new Vector2(v96.X, v96.Y + 4.83);
            Vector2 v112 = new Vector2(v110.X - 0.7449, v110.Y - 0.5085);
            Vector2 v113 = new Vector2(v97.X, v97.Y - 0.6);
            Vector2 v114 = new Vector2(v113.X - 5.2817, v113.Y);
            //右下图
            Vector2 v115 = new Vector2(v96.X + 15, v96.Y);
            Vector2 v116 = new Vector2(v115.X - 0.3332, v115.Y + 4.665);
            Vector2 v117 = new Vector2(v116.X + 1.8087, v116.Y + 1.3579);
            Vector2 v118 = new Vector2(v117.X - 0.4772, v117.Y + 1.2972);
            Vector2 v119 = new Vector2(v118.X, v118.Y + 6.5931);
            Vector2 v120 = new Vector2(v119.X - 4.2458, v119.Y + 0.1108);
            Vector2 v121 = new Vector2(v120.X + 0.3332, v120.Y - 4.665);
            Vector2 v122 = new Vector2(v121.X - 1.8087, v121.Y - 1.3579);
            Vector2 v123 = new Vector2(v122.X + 0.4772, v122.Y - 1.2972);
            Vector2 v124 = new Vector2(v123.X, v123.Y - 6.5931);
            Vector2 v125 = new Vector2(v115.X + 2.1202, v115.Y + 4.2481);
            Vector2 v126 = new Vector2(v116.X + 1.0406, v116.Y - 0.18);
            Vector2 v127 = new Vector2(v117.X - 0.2258, v117.Y - 0.0494);
            Vector2 v128 = new Vector2(v124.X - 0.8134, v124.Y + 9.6);
            Vector2 v129 = new Vector2(v121.X - 1.0406, v121.Y + 0.2);
            Vector2 v130 = new Vector2(v122.X + 0.2258, v122.Y + 0.0494);
            Vector2 v131 = new Vector2(v115.X - 1.6797, v115.Y + 6.95);
            //作图
            //图一
            Vector2[] Line1 = { v2, v1 };
            fun.drawBLine(dxf, Line1, 0.2, contour);
            Vector2[] Line2 = { v2, v3 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            Vector2[] Line3 = { v4, v3 };
            fun.drawBLine(dxf, Line3, 0.1, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes[0].Bulge = -0.88;
            fun.PolyFill(dxf, Arc1, 0.1, contour);
            Vector2[] Line4 = { v5, v6 };
            fun.drawBLine(dxf, Line4, 0.1, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v6));
            Arc2.Vertexes.Add(new LwPolylineVertex(v7));
            Arc2.Vertexes[0].Bulge = -0.88;
            fun.PolyFill(dxf, Arc2, 0.1, contour);
            Vector2[] Line5 = { v7, v8 };
            fun.drawBLine(dxf, Line5, 0.1, contour);
            Vector2[] Line6 = { v9, v8 };
            fun.drawBLine(dxf, Line6, 0.2, contour);
            Vector2[] Line7 = { v9, v10 };
            fun.drawBLine(dxf, Line7, 0.2, contour);
            Vector2[] Line8 = { v11, v10 };
            fun.drawBLine(dxf, Line8, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            Arc3.Vertexes.Add(new LwPolylineVertex(v12));
            Arc3.Vertexes[0].Bulge = -0.691;
            fun.PolyFill(dxf, Arc3, 0.1, contour);
            Vector2[] Line9 = { v12, v13 };
            fun.drawBLine(dxf, Line9, 0.2, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            Arc4.Vertexes.Add(new LwPolylineVertex(v14));
            Arc4.Vertexes[0].Bulge = -0.691;
            fun.PolyFill(dxf, Arc4, 0.1, contour);
            Vector2[] Line10 = { v14, v15 };
            fun.drawBLine(dxf, Line10, 0.2, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v15));
            Arc5.Vertexes.Add(new LwPolylineVertex(v16));
            Arc5.Vertexes[0].Bulge = -0.691;
            fun.PolyFill(dxf, Arc5, 0.1, contour);
            Vector2[] Line11 = { v16, v17 };
            fun.drawBLine(dxf, Line11, 0.2, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            Arc6.Vertexes[0].Bulge = 0.0678;
            fun.PolyFill(dxf, Arc6, 0.2, contour);
            Vector2[] Line12 = { v18, v19 };
            fun.drawBLine(dxf, Line12, 0.2, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            Arc7.Vertexes.Add(new LwPolylineVertex(v20));
            Arc7.Vertexes[0].Bulge = -0.691;
            fun.PolyFill(dxf, Arc7, 0.1, contour);
            Vector2[] Line13 = { v20, v21 };
            fun.drawBLine(dxf, Line13, 0.2, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v21));
            Arc8.Vertexes.Add(new LwPolylineVertex(v22));
            Arc8.Vertexes[0].Bulge = -0.691;
            fun.PolyFill(dxf, Arc8, 0.1, contour);
            Vector2[] Line14 = { v22, v23 };
            fun.drawBLine(dxf, Line14, 0.2, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v23));
            Arc9.Vertexes.Add(new LwPolylineVertex(v24));
            Arc9.Vertexes[0].Bulge = -0.691;
            fun.PolyFill(dxf, Arc9, 0.1, contour);
            Vector2[] Line15 = { v24, v1 };
            fun.drawBLine(dxf, Line15, 0.2, contour);
            //内部图
            Vector2[] Line16 = { v25, v26 };
            fun.drawBLine(dxf, Line16, 0.15, contour);
            Vector2[] Line17 = { v10, v27 };
            fun.drawBLine(dxf, Line17, 0.15, contour);
            Vector2[] Line18 = { v28, v27 };
            fun.drawBLine(dxf, Line18, 0.15, contour);
            Vector2[] Line19 = { v29, v30 };
            fun.drawBLine(dxf, Line19, 0.15, contour);
            Circle circle1 = new Circle(v31, 1);
            commonfun.circleWithWidth(circle1, dxf, 0.15, contour);
            Circle circle2 = new Circle(v31, 1.3);
            commonfun.circleWithWidth(circle2, dxf, 0.15, contour);
            Circle circle3 = new Circle(v32, 1);
            commonfun.circleWithWidth(circle3, dxf, 0.15, contour);
            Circle circle4 = new Circle(v32, 1.3);
            circle4.Layer = contour;
            circle4.Linetype = Linetype.Dashed;
            dxf.AddEntity(circle4);
            //右图
            Vector2[] Line20 = { v33, v34 };
            fun.drawBLine(dxf, Line20, 0.15, contour);
            Vector2[] Line21 = { v35, v34 };
            fun.drawBLine(dxf, Line21, 0.15, contour);
            Vector2[] Line22 = { v35, v36 };
            fun.drawBLine(dxf, Line22, 0.15, contour);
            Vector2[] Line23 = { v37, v36 };
            fun.drawBLine(dxf, Line23, 0.15, contour);
            Vector2[] Line24 = { v37, v38 };
            fun.drawBLine(dxf, Line24, 0.15, contour);
            Vector2[] Line25 = { v39, v38 };
            fun.drawBLine(dxf, Line25, 0.15, contour);
            Vector2[] Line26 = { v39, v40 };
            fun.drawBLine(dxf, Line26, 0.15, contour);
            Vector2[] Line28 = { v33, v40 };
            fun.drawBLine(dxf, Line28, 0.15, contour);
            Vector2[] Line29 = { v41, v42 };
            fun.drawBLine(dxf, Line29, 0.15, contour);
            Vector2[] Line30 = { v43, v44 };
            fun.drawBLine(dxf, Line30, 0.1, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v44));
            Arc10.Vertexes.Add(new LwPolylineVertex(v45));
            Arc10.Vertexes[0].Bulge = -0.071;
            fun.PolyFill(dxf, Arc10, 0.1, contour);
            Vector2[] Line31 = { v46, v47 };
            fun.drawBLine(dxf, Line31, 0.1, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v47));
            Arc11.Vertexes.Add(new LwPolylineVertex(v48));
            Arc11.Vertexes[0].Bulge = -0.071;
            fun.PolyFill(dxf, Arc11, 0.1, contour);
            Vector2[] Line32 = { v49, v50 };
            fun.drawBLine(dxf, Line32, 0.1, contour);
            //右图内部
            Vector2[] Line33 = { v51, v52 };
            fun.drawBLine(dxf, Line33, 0.1, contour);
            Vector2[] Line34 = { v53, v52 };
            fun.drawBLine(dxf, Line34, 0.1, contour);
            Vector2[] Line35 = { v53, v54 };
            fun.drawBLine(dxf, Line35, 0.1, contour);
            Vector2[] Line36 = { v55, v54 };
            fun.drawBLine(dxf, Line36, 0.1, contour);
            Vector2[] Line37 = { v56, v57 };
            fun.drawBLine(dxf, Line37, 0.1, contour);
            Vector2[] Line38 = { v57, v58 };
            fun.drawBLine(dxf, Line38, 0.1, contour);
            Vector2[] Line39 = { v58, v59 };
            fun.drawBLine(dxf, Line39, 0.1, contour);
            Vector2[] Line40 = { v59, v60 };
            fun.drawBLine(dxf, Line40, 0.1, contour);
            Vector2[] Line41 = { v61, v62 };
            fun.drawBLine(dxf, Line41, 0.1, contour);
            Vector2[] Line42 = { v62, v63 };
            fun.drawBLine(dxf, Line42, 0.1, contour);
            Vector2[] Line43 = { v63, v64 };
            fun.drawBLine(dxf, Line43, 0.1, contour);
            Vector2[] Line44 = { v64, v65 };
            fun.drawBLine(dxf, Line44, 0.1, contour);
            Vector2[] Line45 = { v66, v67 };
            fun.drawBLine(dxf, Line45, 0.1, contour);
            Vector2[] Line46 = { v67, v68 };
            fun.drawBLine(dxf, Line46, 0.1, contour);
            Vector2[] Line47 = { v68, v69 };
            fun.drawBLine(dxf, Line47, 0.1, contour);
            Vector2[] Line48 = { v69, v70 };
            fun.drawBLine(dxf, Line48, 0.1, contour);
            Vector2[] Line49 = { v71, v72 };
            fun.drawBLine(dxf, Line49, 0.1, contour);
            Vector2[] Line50 = { v72, v73 };
            fun.drawBLine(dxf, Line50, 0.1, contour);
            Vector2[] Line51 = { v73, v74 };
            fun.drawBLine(dxf, Line51, 0.1, contour);
            Vector2[] Line52 = { v74, v75 };
            fun.drawBLine(dxf, Line52, 0.1, contour);
            Vector2[] Line53 = { v76, v77 };
            fun.drawBLine(dxf, Line53, 0.1, contour);
            Vector2[] Line54 = { v77, v78 };
            fun.drawBLine(dxf, Line54, 0.1, contour);
            Vector2[] Line55 = { v78, v79 };
            fun.drawBLine(dxf, Line55, 0.1, contour);
            Vector2[] Line56 = { v79, v80 };
            fun.drawBLine(dxf, Line56, 0.1, contour);
            //右图内部虚线
            Vector2[] Line57 = { v81, v82 };
            fun.drawPlinetype(dxf, Line57, 0.15, centre, Linetype.Dashed);
            Vector2[] Line58 = { v83, v82 };
            fun.drawPlinetype(dxf, Line58, 0.15, centre, Linetype.Dashed);
            Vector2[] Line59 = { v84, v85 };
            fun.drawPlinetype(dxf, Line59, 0.15, centre, Linetype.Dashed);
            Vector2[] Line60 = { v86, v85 };
            fun.drawPlinetype(dxf, Line60, 0.15, centre, Linetype.Dashed);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v87));
            Arc12.Vertexes.Add(new LwPolylineVertex(v88));
            Arc12.Vertexes[0].Bulge = 0.1729;
            Arc12.Layer = centre;
            Arc12.Linetype = Linetype.Dashed;
            dxf.AddEntity(Arc12);
            Vector2[] Line61 = { v88, v89 };
            fun.drawPlinetype(dxf, Line61, 0.15, centre, Linetype.Dashed);
            Vector2[] Line62 = { v90, v91 };
            fun.drawPlinetype(dxf, Line62, 0.15, centre, Linetype.Dashed);
            Vector2[] Line64 = { v92, v93 };
            fun.drawPlinetype(dxf, Line64, 0.15, centre, Linetype.Dashed);
            Vector2[] Line65 = { v94, v95 };
            fun.drawPlinetype(dxf, Line65, 0.15, centre, Linetype.Dashed);
            //左下图
            Vector2[] Line66 = { v97, v96 };
            fun.drawBLine(dxf, Line66, 0.2, contour);
            Vector2[] Line67 = { v97, v98 };
            fun.drawBLine(dxf, Line67, 0.2, contour);
            Vector2[] Line68 = { v99, v98 };
            fun.drawBLine(dxf, Line68, 0.2, contour);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v99));
            Arc13.Vertexes.Add(new LwPolylineVertex(v100));
            Arc13.Vertexes[0].Bulge = 0.2265;
            fun.PolyFill(dxf, Arc13, 0.2, contour);
            Vector2[] Line69 = { v100, v101 };
            fun.drawBLine(dxf, Line69, 0.2, contour);
            Vector2[] Line70 = { v101, v96 };
            fun.drawBLine(dxf, Line70, 0.2, contour);
            Vector2[] Line71 = { v102, v103 };
            fun.drawBLine(dxf, Line71, 0.2, contour);
            Vector2[] Line72 = { v104, v105 };
            fun.drawBLine(dxf, Line72, 0.2, contour);
            Vector2[] Line73 = { v106, v107 };
            fun.drawBLine(dxf, Line73, 0.2, contour);
            Vector2[] Line74 = { v108, v98 };
            fun.drawBLine(dxf, Line74, 0.2, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v107));
            Arc14.Vertexes.Add(new LwPolylineVertex(v108));
            Arc14.Vertexes[0].Bulge = -0.1;
            fun.PolyFill(dxf, Arc14, 0.2, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v107));
            Arc15.Vertexes.Add(new LwPolylineVertex(v109));
            Arc15.Vertexes[0].Bulge = 0.1;
            fun.PolyFill(dxf, Arc15, 0.2, contour);
            Vector2[] Line75 = { v109, v110 };
            fun.drawBLine(dxf, Line75, 0.2, contour);
            Vector2[] Line76 = { v111, v110 };
            fun.drawBLine(dxf, Line76, 0.3, contour);
            Vector2[] Line77 = { v99, v100 };
            fun.drawBLine(dxf, Line77, 0.15, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v112));
            Arc16.Vertexes.Add(new LwPolylineVertex(v110));
            Arc16.Vertexes[0].Bulge = -0.3217;
            fun.PolyFill(dxf, Arc16, 0.2, contour);
            Vector2[] Line78 = { v113, v114 };
            fun.drawBLine(dxf, Line78, 0.2, contour);
            //右下图
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v115));
            Arc17.Vertexes.Add(new LwPolylineVertex(v116));
            Arc17.Vertexes[0].Bulge = -0.3113;
            fun.PolyFill(dxf, Arc17, 0.2, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v117));
            Arc18.Vertexes.Add(new LwPolylineVertex(v116));
            Arc18.Vertexes[0].Bulge = 0.1993;
            fun.PolyFill(dxf, Arc18, 0.2, contour);
            Vector2[] Line79 = { v117, v118 };
            fun.drawBLine(dxf, Line79, 0.2, contour);
            Vector2[] Line80 = { v119, v118 };
            fun.drawBLine(dxf, Line80, 0.2, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v119));
            Arc19.Vertexes.Add(new LwPolylineVertex(v120));
            Arc19.Vertexes[0].Bulge = 0.1615;
            fun.PolyFill(dxf, Arc19, 0.2, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v121));
            Arc20.Vertexes.Add(new LwPolylineVertex(v120));
            Arc20.Vertexes[0].Bulge = 0.3113;
            fun.PolyFill(dxf, Arc20, 0.2, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v121));
            Arc21.Vertexes.Add(new LwPolylineVertex(v122));
            Arc21.Vertexes[0].Bulge = -0.1993;
            fun.PolyFill(dxf, Arc21, 0.2, contour);
            Vector2[] Line81 = { v122, v123 };
            fun.drawBLine(dxf, Line81, 0.2, contour);
            Vector2[] Line82 = { v124, v123 };
            fun.drawBLine(dxf, Line82, 0.2, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v124));
            Arc22.Vertexes.Add(new LwPolylineVertex(v115));
            Arc22.Vertexes[0].Bulge = 0.1615;
            fun.PolyFill(dxf, Arc22, 0.2, contour);
            Vector2[] Line83 = { v116, v125 };
            fun.drawBLine(dxf, Line83, 0.2, contour);
            Vector2[] Line84 = { v117, v125 };
            fun.drawBLine(dxf, Line84, 0.25, contour);
            Vector2[] Line85 = { v126, v127 };
            fun.drawBLine(dxf, Line85, 0.2, contour);
            Vector2[] Line86 = { v128, v121 };
            fun.drawBLine(dxf, Line86, 0.2, contour);
            Vector2[] Line87 = { v128, v122 };
            fun.drawBLine(dxf, Line87, 0.25, contour);
            Vector2[] Line88 = { v129, v130 };
            fun.drawBLine(dxf, Line88, 0.20, contour);
            Circle circle5 = new Circle(v131, 2);
            commonfun.circleWithWidth(circle5, dxf, 0.2, contour);
            //图一标注
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.5;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 2;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 0.3;
            LinearDimension dim1 = new LinearDimension(new Line(v1, v10), offset, 90, dimensionStyle);
            dim1.UserText = "DCI ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v98, v101), offset, 90, dimensionStyle);
            dim2.UserText = "DCI ";
            dxf.AddEntity(dim2);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureF12(Dictionary<string, Object> data)//ISO 29014-2图片F.12
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层                                                                                      
            //参数           
            double ha = 4.33;
            double hc = 3.83;
            double hb2 = 0.5;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + 5);
            Vector2 v3 = new Vector2(v2.X + 4.7113, v2.Y);
            Vector2 v4 = new Vector2(v3.X + 0.433, v3.Y + 0.25);
            Vector2 v5 = new Vector2(v4.X + 1.9226, v3.Y + hc);
            Vector2 v6 = new Vector2(v5.X + 0.866, v5.Y);
            Vector2 v7 = new Vector2(v6.X + 2.0992, v6.Y - 3.6359);
            Vector2 v8 = new Vector2(v7.X + 0.4325, v7.Y - 0.25);
            Vector2 v9 = new Vector2(v8.X + 3.5006, v8.Y);
            Vector2 v10 = new Vector2(v9.X + 0.3536, v9.Y - 0.1464);
            Vector2 v11 = new Vector2(v10.X + 0.4142, v10.Y - 0.4142);
            Vector2 v12 = new Vector2(v11.X + 0.3536, v11.Y - 0.1464);
            Vector2 v13 = new Vector2(v12.X + 3.5, v12.Y);
            Vector2 v14 = new Vector2(v13.X + 2.3027, v13.Y - 3.2915);
            //标注点
            Vector2 v15 = new Vector2(v1.X + 3.1392, v1.Y + 1.7769);
            Vector2 v16 = new Vector2(v5.X + 0.57, v5.Y + 0.4894 + hb2);
            Vector2 v17 = new Vector2(v7.X + 1.3259, v7.Y - 2.2966);
            Vector2 v18 = new Vector2(v16.X - 0.2764, v3.Y + ha + 0.4894);
            Vector2 v19 = new Vector2(v17.X - 0.43, v17.Y);
            Vector2 v20 = new Vector2(v19.X + 4.9817, v19.Y + 7.0799);
            Vector2 v21 = new Vector2(v20.X - 0.16, v20.Y);
            Vector2 v22 = new Vector2(v14.X - 1.49, v14.Y + 1.9276);
            Vector2 v23 = new Vector2(v5.X + 0.43, v5.Y + 0.75);
            //作图
            Vector2[] Line1 = { v2, v1 };
            fun.drawBLine(dxf, Line1, 0.2, contour);
            Vector2[] Line2 = { v2, v3 };
            fun.drawBLine(dxf, Line2, 0.2, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v3));
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes[0].Bulge = 0.167;
            fun.PolyFill(dxf, Arc1, 0.2, contour);
            Vector2[] Line3 = { v4, v5 };
            fun.drawBLine(dxf, Line3, 0.2, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v5));
            Arc2.Vertexes.Add(new LwPolylineVertex(v6));
            Arc2.Vertexes[0].Bulge = -0.5;
            fun.PolyFill(dxf, Arc2, 0.2, contour);
            Vector2[] Line4 = { v6, v7 };
            fun.drawBLine(dxf, Line4, 0.2, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v7));
            Arc3.Vertexes.Add(new LwPolylineVertex(v8));
            Arc3.Vertexes[0].Bulge = 0.167;
            fun.PolyFill(dxf, Arc3, 0.2, contour);
            Vector2[] Line5 = { v8, v9 };
            fun.drawBLine(dxf, Line5, 0.2, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v9));
            Arc4.Vertexes.Add(new LwPolylineVertex(v10));
            Arc4.Vertexes[0].Bulge = -0.167;
            fun.PolyFill(dxf, Arc4, 0.2, contour);
            Vector2[] Line6 = { v10, v11 };
            fun.drawBLine(dxf, Line6, 0.2, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v12));
            Arc5.Vertexes.Add(new LwPolylineVertex(v11));
            Arc5.Vertexes[0].Bulge = -0.167;
            fun.PolyFill(dxf, Arc5, 0.2, contour);
            Vector2[] Line7 = { v12, v13 };
            fun.drawBLine(dxf, Line7, 0.2, contour);
            Vector2[] Line8 = { v14, v13 };
            fun.drawBLine(dxf, Line8, 0.2, contour);
            //标注线
            Vector2[] Line9 = { v15, v16 };
            fun.drawBLine(dxf, Line9, 0.07, skviewdimensioning);
            Vector2[] Line10 = { v17, v18 };
            fun.drawBLine(dxf, Line10, 0.07, skviewdimensioning);
            Vector2[] Line11 = { v19, v20 };
            fun.drawBLine(dxf, Line11, 0.07, skviewdimensioning);
            Vector2[] Line12 = { v21, v22 };
            fun.drawBLine(dxf, Line12, 0.07, skviewdimensioning);
            //标注           
            //标注样式
            //箭头样式
            double offset = 5;
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.3;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //尺寸标注
            DimensionStyle ds = new DimensionStyle("sd");
            ds.ArrowSize = 1;
            ds.DimArrow1 = DimensionArrowhead.Closedfilled;
            ds.DimArrow2 = DimensionArrowhead.Closedfilled;
            //文本样式
            dimensionStyle.TextHeight = 0.2;
            LinearDimension dim1 = new LinearDimension(new Line(v2, v5), offset, 90, dimensionStyle);
            dim1.UserText = "HC ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v2, v23), offset + 3, 90, dimensionStyle);
            dim2.UserText = "HA ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v5, v23), offset, 90, dimensionStyle);
            dim3.UserText = "HB2 ";
            dxf.AddEntity(dim3);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
    }
    class ISO2901402G
    {
        public static void FigureG4(Dictionary<string, Object> data)//ISO 29014-2图片G.4
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double wf = 8;
            double f = 1;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + wf / 4, v1.Y);
            Vector2 v3 = new Vector2(v1.X, v1.Y - wf / 4 - f / 2);
            Vector2 v4 = new Vector2(v3.X + wf / 4, v3.Y);
            Vector2 v5 = new Vector2(v4.X + wf / 2, v4.Y);
            Vector2 v6 = new Vector2(v2.X + wf / 2, v2.Y);
            Vector2 v7 = new Vector2(v5.X + wf / 4, v5.Y);
            Vector2 v8 = new Vector2(v6.X + wf / 4, v6.Y);
            //
            Vector2 v9 = new Vector2(v1.X, v1.Y - wf * 1.6);
            Vector2 v10 = new Vector2(v9.X + wf / 4, v9.Y + wf * 1.8 / 4);
            Vector2 v11 = new Vector2(v10.X + wf / 2, v10.Y);
            Vector2 v12 = new Vector2(v11.X + wf / 4, v10.Y - wf * 1.8 / 4);
            Vector2 v13 = new Vector2(v12.X - wf / 4, v12.Y - wf * 1.8 / 4);
            Vector2 v14 = new Vector2(v9.X + wf / 4, v9.Y - wf * 1.8 / 4);
            Vector2 v15 = new Vector2(v9.X, v9.Y - wf * 1.8 / 4);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.05, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.05, contour);
            Vector2[] Line3 = { v4, v3 };
            fun.drawBLine(dxf, Line3, 0.05, contour);
            Vector2[] Line4 = { v4, v2 };
            fun.drawBLine(dxf, Line4, 0.05, contour);
            Vector2[] Line5 = { v4, v5 };
            fun.drawBLine(dxf, Line5, 0.05, contour);
            Vector2[] Line6 = { v2, v6 };
            fun.drawBLine(dxf, Line6, 0.05, contour);
            Vector2[] Line7 = { v5, v6 };
            fun.drawBLine(dxf, Line7, 0.05, contour);
            Vector2[] Line8 = { v5, v7 };
            fun.drawBLine(dxf, Line8, 0.05, contour);
            Vector2[] Line9 = { v6, v8 };
            fun.drawBLine(dxf, Line9, 0.05, contour);
            Vector2[] Line10 = { v7, v8 };
            fun.drawBLine(dxf, Line10, 0.05, contour);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 0;
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v1.X + wf + f * 2, v1.Y), new Vector2(v1.X, v1.Y)), offset, 180, dimensionStyle);
            dim1.UserText = " X  ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(v1.X, v1.Y + wf / 2), new Vector2(v1.X, v1.Y)), offset, 90, dimensionStyle);
            dim2.UserText = " Y  ";
            dxf.AddEntity(dim2);
            //
            Vector2[] Line11 = { v9, v10 };
            fun.drawBLine(dxf, Line11, 0.05, contour);
            Vector2[] Line12 = { v11, v10 };
            fun.drawBLine(dxf, Line12, 0.05, contour);
            Vector2[] Line13 = { v11, v12 };
            fun.drawBLine(dxf, Line13, 0.05, contour);
            Vector2[] Line14 = { v13, v12 };
            fun.drawBLine(dxf, Line14, 0.05, contour);
            Vector2[] Line15 = { v14, v9 };
            fun.drawBLine(dxf, Line15, 0.05, contour);
            Vector2[] Line16 = { v13, v14 };
            fun.drawBLine(dxf, Line16, 0.05, contour);
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(v15.X + wf + f * 2, v15.Y), new Vector2(v15.X, v15.Y)), offset, 180, dimensionStyle);
            dim3.UserText = " X  ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(new Vector2(v15.X, v15.Y + wf), new Vector2(v15.X, v15.Y)), offset, 90, dimensionStyle);
            dim4.UserText = " Y  ";
            dxf.AddEntity(dim4);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureG5(Dictionary<string, Object> data)//ISO 29014-2图片G.5
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //作图
                                                                           //参数
            double wf = 8;
            double f = 1;
            double pi = Math.PI;
            double fn = 28 * pi / 180;
            double o = 32 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + f / 6, v1.Y);
            Vector2 v3 = new Vector2(v2.X + f / 6, v1.Y - f);
            Vector2 v4 = new Vector2(v2.X + wf / 1.8, v1.Y);
            Vector2 v5 = new Vector2(v4.X - f, v1.Y);
            Vector2 v6 = new Vector2(v5.X - f / 10, v3.Y);
            Vector2 v7 = new Vector2(v4.X - f / 6, v3.Y);
            Vector2 v8 = new Vector2(v1.X, v1.Y - wf);
            Vector2 v9 = new Vector2(v8.X + wf / 5.2 - f * 1 / 5, v8.Y + wf / 3.6);
            Vector2 v10 = new Vector2(v8.X + f / 6.6, v8.Y + f / 3.6);
            Vector2 v11 = new Vector2(v8.X + f / 2.8, v8.Y);
            Vector2 v12 = new Vector2(v8.X + f * 4, v8.Y);
            Vector2 v13 = new Vector2(v12.X + f, v12.Y + f * 1.8 + f * 9 / 50);
            Vector2 v14 = new Vector2(v13.X - f / 19.68 - f * 11 / 100, v9.Y);
            // 线段
            //主视图
            Vector2[] Line1 = { v3, v2 };
            fun.drawBLine(dxf, Line1, 0.05, contour);
            Vector2[] Line2 = { v1, v2 };
            fun.drawBLine(dxf, Line2, 0.05, contour);
            Vector2[] Line3 = { v4, v2 };
            fun.drawBLine(dxf, Line3, 0.05, contour);
            Vector2[] Line4 = { v5, v6 };
            fun.drawBLine(dxf, Line4, 0.05, contour);
            Vector2[] Line5 = { v3, v6 };
            fun.drawBLine(dxf, Line5, 0.05, contour);
            Vector2[] Line6 = { v7, v6 };
            fun.drawBLine(dxf, Line6, 0.05, contour);
            Vector2[] Line7 = { v4, v7 };
            fun.drawBLine(dxf, Line7, 0.05, contour);
            Vector2[] Line8 = { v10, v9 };
            fun.drawBLine(dxf, Line8, 0.05, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v10));
            Arc1.Vertexes.Add(new LwPolylineVertex(v11));
            Arc1.Vertexes[0].Bulge = ((f / 1.6) / Math.Tan(fn)) * Math.Sin(fn);
            fun.PolyFill(dxf, Arc1, 0.05, contour);
            Vector2[] Line9 = { v11, v12 };
            fun.drawBLine(dxf, Line9, 0.05, contour);
            Vector2[] Line10 = { v8, v10 };
            fun.drawBLine(dxf, Line10, 0.03, contour);
            Vector2[] Line11 = { v8, v11 };
            fun.drawBLine(dxf, Line11, 0.03, contour);
            Vector2[] Line12 = { v12, v13 };
            fun.drawBLine(dxf, Line12, 0.05, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v13));
            Arc2.Vertexes.Add(new LwPolylineVertex(v14));
            Arc2.Vertexes[0].Bulge = (f / 2.311) / Math.Sin(fn) * Math.Tan(o);
            fun.PolyFill(dxf, Arc2, 0.05, contour);
            Vector2[] Line13 = { v9, v14 };
            fun.drawBLine(dxf, Line13, 0.05, contour);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureG6(Dictionary<string, Object> data)//ISO 29014-2图片G.6
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double wf = 8;
            double f = 1;
            double pi = Math.PI;
            double fn = 44 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + wf, v1.Y);
            Vector2 v3 = new Vector2(v1.X, v1.Y - wf / 5);
            Vector2 v4 = new Vector2(v3.X + wf, v3.Y);
            Vector2 v5 = new Vector2(v1.X, v1.Y - wf * 1.6);
            Vector2 v6 = new Vector2(v5.X, v5.Y + wf / 2.6);
            Vector2 v7 = new Vector2(v6.X + f * 3 / 10, v6.Y + f * 3 / 10);
            Vector2 v8 = new Vector2(v2.X - f * 3 / 10, v7.Y);
            Vector2 v9 = new Vector2(v2.X, v7.Y - f * 3 / 10);
            Vector2 v10 = new Vector2(v2.X, v5.Y);
            Vector2 v11 = new Vector2(v10.X - f * 3 / 10, v10.Y - f * 3 / 10);
            Vector2 v12 = new Vector2(v5.X + f * 3 / 10, v5.Y - f * 3 / 10);
            Vector2 v13 = new Vector2(v5.X, v5.Y - f * 3 / 10);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.05, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.05, contour);
            Vector2[] Line3 = { v4, v3 };
            fun.drawBLine(dxf, Line3, 0.05, contour);
            Vector2[] Line4 = { v4, v2 };
            fun.drawBLine(dxf, Line4, 0.05, contour);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 0;
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v1.X + wf + f * 2, v1.Y), new Vector2(v1.X, v1.Y)), offset, 180, dimensionStyle);
            dim1.UserText = " X  ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(v1.X, v1.Y + wf / 2), new Vector2(v1.X, v1.Y)), offset, 90, dimensionStyle);
            dim2.UserText = " Y  ";
            dxf.AddEntity(dim2);
            Vector2[] Line5 = { v5, v6 };
            fun.drawBLine(dxf, Line5, 0.05, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            Arc1.Vertexes.Add(new LwPolylineVertex(v7));
            Arc1.Vertexes[0].Bulge = -((f) / Math.Cos(fn)) * Math.Sin(fn / 2.4);
            fun.PolyFill(dxf, Arc1, 0.05, contour);
            Vector2[] Line6 = { v7, v8 };
            fun.drawBLine(dxf, Line6, 0.05, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v8));
            Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            Arc2.Vertexes[0].Bulge = -((f) / Math.Cos(fn)) * Math.Sin(fn / 2.4);
            fun.PolyFill(dxf, Arc2, 0.05, contour);
            Vector2[] Line7 = { v9, v10 };
            fun.drawBLine(dxf, Line7, 0.05, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v10));
            Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            Arc3.Vertexes[0].Bulge = -((f) / Math.Cos(fn)) * Math.Sin(fn / 2.4);
            fun.PolyFill(dxf, Arc3, 0.05, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            Arc4.Vertexes.Add(new LwPolylineVertex(v5));
            Arc4.Vertexes[0].Bulge = -((f) / Math.Cos(fn)) * Math.Sin(fn / 2.37);
            fun.PolyFill(dxf, Arc4, 0.05, contour);
            Vector2[] Line8 = { v11, v12 };
            fun.drawBLine(dxf, Line8, 0.05, contour);
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(v13.X + wf + f * 2, v13.Y), new Vector2(v13.X, v13.Y)), offset, 180, dimensionStyle);
            dim3.UserText = " X  ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(new Vector2(v13.X, v13.Y + wf), new Vector2(v13.X, v13.Y)), offset, 90, dimensionStyle);
            dim4.UserText = " Y  ";
            dxf.AddEntity(dim4);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureG7(Dictionary<string, Object> data)//ISO 29014-2图片G.7
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double f = 1;
            double wf = 8;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X - f * 1.6, v1.Y);
            Vector2 v3 = new Vector2(v2.X, v2.Y - f * 2);
            Vector2 v4 = new Vector2(v1.X, v2.Y - f * 2);
            Vector2 v5 = new Vector2(v1.X + f * 2.6, v1.Y);
            Vector2 v6 = new Vector2(v4.X + f * 2.6, v4.Y);
            Vector2 v7 = new Vector2(v6.X + f * 1.6, v6.Y);
            Vector2 v8 = new Vector2(v5.X + f * 1.6, v5.Y);
            Vector2 v9 = new Vector2(v1.X, v1.Y - wf);
            Vector2 v10 = new Vector2(v9.X + f * 2.6, v9.Y);
            Vector2 v11 = new Vector2(v10.X + f * 1.5, v10.Y - f * 1.88);
            Vector2 v12 = new Vector2(v11.X, v11.Y - f * 1.8);
            Vector2 v13 = new Vector2(v12.X - f * 1.5, v12.Y - f * 1.88);
            Vector2 v14 = new Vector2(v13.X - f * 2.6, v13.Y);
            Vector2 v15 = new Vector2(v14.X - f * 1.5, v14.Y + f * 1.88);
            Vector2 v16 = new Vector2(v9.X - f * 1.5, v9.Y - f * 1.88);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.05, contour);
            Vector2[] Line2 = { v3, v2 };
            fun.drawBLine(dxf, Line2, 0.05, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.05, contour);
            Vector2[] Line4 = { v4, v1 };
            fun.drawBLine(dxf, Line4, 0.05, contour);
            Vector2[] Line5 = { v5, v1 };
            fun.drawBLine(dxf, Line5, 0.05, contour);
            Vector2[] Line6 = { v4, v6 };
            fun.drawBLine(dxf, Line6, 0.05, contour);
            Vector2[] Line7 = { v5, v6 };
            fun.drawBLine(dxf, Line7, 0.05, contour);
            Vector2[] Line8 = { v7, v6 };
            fun.drawBLine(dxf, Line8, 0.05, contour);
            Vector2[] Line9 = { v8, v5 };
            fun.drawBLine(dxf, Line9, 0.05, contour);
            Vector2[] Line10 = { v8, v7 };
            fun.drawBLine(dxf, Line10, 0.05, contour);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 0;
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v1.X + wf + f * 2, v1.Y), new Vector2(v1.X, v1.Y)), offset, 180, dimensionStyle);
            dim1.UserText = " X  ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(v1.X, v1.Y + wf / 2), new Vector2(v1.X, v1.Y)), offset, 90, dimensionStyle);
            dim2.UserText = " Y  ";
            dxf.AddEntity(dim2);
            Vector2[] Line11 = { v9, v10 };
            fun.drawBLine(dxf, Line11, 0.05, contour);
            Vector2[] Line12 = { v11, v10 };
            fun.drawBLine(dxf, Line12, 0.05, contour);
            Vector2[] Line13 = { v11, v12 };
            fun.drawBLine(dxf, Line13, 0.05, contour);
            Vector2[] Line14 = { v13, v12 };
            fun.drawBLine(dxf, Line14, 0.05, contour);
            Vector2[] Line15 = { v13, v14 };
            fun.drawBLine(dxf, Line15, 0.05, contour);
            Vector2[] Line16 = { v15, v14 };
            fun.drawBLine(dxf, Line16, 0.05, contour);
            Vector2[] Line17 = { v16, v9 };
            fun.drawBLine(dxf, Line17, 0.05, contour);
            Vector2[] Line18 = { v16, v15 };
            fun.drawBLine(dxf, Line18, 0.05, contour);
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(v14.X + wf + f * 2, v14.Y), new Vector2(v14.X, v14.Y)), offset, 180, dimensionStyle);
            dim3.UserText = " X  ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(new Vector2(v14.X, v14.Y + wf), new Vector2(v14.X, v14.Y)), offset, 90, dimensionStyle);
            dim4.UserText = " Y  ";
            dxf.AddEntity(dim4);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureG8(Dictionary<string, Object> data)//ISO 29014-2图片G.8
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double wf = 8;
            double f = 1;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X - f / 1.38, 0);
            Vector2 v3 = new Vector2(v2.X, v2.Y - f * 1.5);
            Vector2 v4 = new Vector2(v3.X + f / 1.38, v3.Y);
            Vector2 v5 = new Vector2(v4.X + f * 3.6, v4.Y);
            Vector2 v6 = new Vector2(v1.X + f * 3.6, v1.Y);
            Vector2 v7 = new Vector2(v6.X + f / 1.38, 0);
            Vector2 v8 = new Vector2(v5.X + f / 1.38, v5.Y);
            Vector2 v9 = new Vector2(v1.X + f * 1.8, v1.Y - wf);
            Vector2 v10 = new Vector2(v2.X, v9.Y - f * 1.8);
            Vector2 v11 = new Vector2(v1.X, v10.Y - f * 3.2);
            Vector2 v12 = new Vector2(v7.X, v10.Y);
            Vector2 v13 = new Vector2(v5.X, v10.Y - f * 3.2);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.05, contour);
            Vector2[] Line2 = { v3, v2 };
            fun.drawBLine(dxf, Line2, 0.05, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.05, contour);
            Vector2[] Line4 = { v1, v4 };
            fun.drawBLine(dxf, Line4, 0.05, contour);
            Vector2[] Line5 = { v5, v4 };
            fun.drawBLine(dxf, Line5, 0.05, contour);
            Vector2[] Line6 = { v1, v6 };
            fun.drawBLine(dxf, Line6, 0.05, contour);
            Vector2[] Line7 = { v5, v6 };
            fun.drawBLine(dxf, Line7, 0.05, contour);
            Vector2[] Line8 = { v7, v6 };
            fun.drawBLine(dxf, Line8, 0.05, contour);
            Vector2[] Line9 = { v5, v8 };
            fun.drawBLine(dxf, Line9, 0.05, contour);
            Vector2[] Line10 = { v7, v8 };
            fun.drawBLine(dxf, Line10, 0.05, contour);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 0;
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v1.X + wf, v1.Y), new Vector2(v1.X, v1.Y)), offset, 180, dimensionStyle);
            dim1.UserText = " X  ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(v1.X, v1.Y + wf / 2), new Vector2(v1.X, v1.Y)), offset, 90, dimensionStyle);
            dim2.UserText = " Y  ";
            dxf.AddEntity(dim2);
            Vector2[] Line11 = { v9, v10 };
            fun.drawBLine(dxf, Line11, 0.05, contour);
            Vector2[] Line12 = { v11, v10 };
            fun.drawBLine(dxf, Line12, 0.05, contour);
            Vector2[] Line13 = { v9, v12 };
            fun.drawBLine(dxf, Line13, 0.05, contour);
            Vector2[] Line14 = { v13, v12 };
            fun.drawBLine(dxf, Line14, 0.05, contour);
            Vector2[] Line15 = { v11, v13 };
            fun.drawBLine(dxf, Line15, 0.05, contour);
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(v11.X + wf + f * 2, v11.Y), new Vector2(v11.X, v11.Y)), offset, 180, dimensionStyle);
            dim3.UserText = " X  ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(new Vector2(v11.X, v11.Y + wf), new Vector2(v11.X, v11.Y)), offset, 90, dimensionStyle);
            dim4.UserText = " Y  ";
            dxf.AddEntity(dim4);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void FigureG9(Dictionary<string, Object> data)//ISO 29014-2图片G.9
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double wf = 8;
            double f = 1;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y - f * 1.6);
            Vector2 v3 = new Vector2(v2.X + wf / 1.8, v2.Y);
            Vector2 v4 = new Vector2(v1.X + wf / 1.8, v1.Y);
            Vector2 v5 = new Vector2(v1.X + f * 2.2, v1.Y - wf);
            Vector2 v6 = new Vector2(v1.X, v5.Y - f * 2.2);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.05, contour);
            Vector2[] Line2 = { v3, v2 };
            fun.drawBLine(dxf, Line2, 0.05, contour);
            Vector2[] Line3 = { v1, v4 };
            fun.drawBLine(dxf, Line3, 0.05, contour);
            Vector2[] Line4 = { v3, v4 };
            fun.drawBLine(dxf, Line4, 0.05, contour);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 0.2;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 0;
            LinearDimension dim1 = new LinearDimension(new Line(new Vector2(v1.X + wf + f, v1.Y), new Vector2(v1.X, v1.Y)), offset, 180, dimensionStyle);
            dim1.UserText = " X  ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(new Vector2(v1.X, v1.Y + wf / 2), new Vector2(v1.X, v1.Y)), offset, 90, dimensionStyle);
            dim2.UserText = " Z  ";
            dxf.AddEntity(dim2);
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v5, 0, f * 2.2)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v5, Math.PI, f * 2.2)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v5, 0, f * 2.2)));
            fun.PolyFill(dxf, poly, 0.05, contour);
            LinearDimension dim3 = new LinearDimension(new Line(new Vector2(v6.X + wf / 1.6, v6.Y), new Vector2(v6.X, v6.Y)), offset, 180, dimensionStyle);
            dim3.UserText = " X  ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(new Vector2(v6.X, v6.Y + wf / 1.2), new Vector2(v6.X, v6.Y)), offset, 90, dimensionStyle);
            dim4.UserText = " Y  ";
            dxf.AddEntity(dim4);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
    }
}



        
